Start spark shell using below line of command
$ spark2-shell --packages com.databricks:spark-avro_2.11:4.0.0
Now try using below line of code, change the path to exact path.
import com.databricks.spark.avro._
val df= spark.read.format("com.databricks.spark.avro").option("header","true").load("hdfs://nameservice1/user/edureka_315701/blogspot/category/part-m-00000.avro") // Loading avro