Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,8 @@ import os
|
|
6 |
import gradio as gr
|
7 |
from io import BytesIO
|
8 |
|
9 |
-
#global prediction_endpoint
|
10 |
-
#global prediction_key
|
11 |
-
#global project_id
|
12 |
-
#global model_name
|
13 |
|
14 |
-
|
15 |
load_dotenv()
|
16 |
prediction_endpoint = os.getenv('PredictionEndpoint')
|
17 |
prediction_key = os.getenv('PredictionKey')
|
@@ -45,7 +41,7 @@ title = "Detect 3 types of fruits - Carrot, Cucumber, Pear"
|
|
45 |
interface = gr.Interface(
|
46 |
fn=classifyImage,
|
47 |
inputs=gr.Image(type="pil", label="Input Image"),
|
48 |
-
outputs=gr.Textbox(label="
|
49 |
title=title,
|
50 |
)
|
51 |
|
|
|
6 |
import gradio as gr
|
7 |
from io import BytesIO
|
8 |
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
# Get Configuration Settings
|
11 |
load_dotenv()
|
12 |
prediction_endpoint = os.getenv('PredictionEndpoint')
|
13 |
prediction_key = os.getenv('PredictionKey')
|
|
|
41 |
interface = gr.Interface(
|
42 |
fn=classifyImage,
|
43 |
inputs=gr.Image(type="pil", label="Input Image"),
|
44 |
+
outputs=gr.Textbox(label="Fruit detection with confidence level"),
|
45 |
title=title,
|
46 |
)
|
47 |
|