KhadijaAsehnoune12 commited on
Commit
a4a1608
1 Parent(s): d4d4818

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -2,14 +2,16 @@ import gradio as gr
2
  from transformers import pipeline
3
  import json
4
 
5
- # Load the config.json file
6
- config_path = "KhadijaAsehnoune12/LeafDiseaseDetector/config.json" # Update this path
7
- with open(config_path, "r", encoding="utf-8") as f:
8
- config = json.load(f)
9
 
10
  # Initialize the pipeline
11
  pipe = pipeline(task="image-classification", model="KhadijaAsehnoune12/LeafDiseaseDetector")
12
 
 
 
 
 
 
13
  # Define a custom prediction function
14
  def predict(image):
15
  # Get the predictions from the pipeline
 
2
  from transformers import pipeline
3
  import json
4
 
5
+
 
 
 
6
 
7
  # Initialize the pipeline
8
  pipe = pipeline(task="image-classification", model="KhadijaAsehnoune12/LeafDiseaseDetector")
9
 
10
+ # Load the config.json file
11
+ config_path = "config.json" # Update this path
12
+ with open(config_path, "r", encoding="utf-8") as f:
13
+ config = json.load(f)
14
+
15
  # Define a custom prediction function
16
  def predict(image):
17
  # Get the predictions from the pipeline