Spaces:
Build error
Build error
Commit
·
d444637
1
Parent(s):
d34cdf9
Update app.py
Browse filesAdded Html text
app.py
CHANGED
@@ -11,7 +11,15 @@ def predict_image(get_image):
|
|
11 |
pred, idx, probs = learn.predict(get_image)
|
12 |
return dict(zip(categories, map(float, probs)))
|
13 |
|
14 |
-
title = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
description = """
|
16 |
This Space demonstrates model based on efficientnet base model.
|
17 |
|
@@ -27,25 +35,11 @@ examples = [
|
|
27 |
#["Covid Xray Image 7","covid/covid_1031.png"]
|
28 |
]
|
29 |
article="<p style='text-align: center'><a href='https://www.kaggle.com/datasets/anasmohammedtahir/covidqu' target='_blank'>COVID-QU-Ex Dataset</a></p>"
|
30 |
-
interpretation="
|
31 |
num_shap=5
|
32 |
enable_queue=True
|
33 |
|
34 |
|
35 |
-
gr.Interface(fn=predict_image,
|
36 |
-
|
37 |
-
gr.inputs.Textbox(
|
38 |
-
label="Target Text",
|
39 |
-
lines=1),
|
40 |
-
gr.inputs.Image(
|
41 |
-
label='Input Image'),
|
42 |
-
gr.inputs.Textbox(
|
43 |
-
label="Class Type")
|
44 |
-
],
|
45 |
-
outputs = gr.Label(num_top_classes=3),
|
46 |
-
title=title,description=description,
|
47 |
-
examples=examples,
|
48 |
-
article=article,
|
49 |
-
interpretation=interpretation,
|
50 |
-
enable_queue=enable_queue).launch(share=False)
|
51 |
|
|
|
11 |
pred, idx, probs = learn.predict(get_image)
|
12 |
return dict(zip(categories, map(float, probs)))
|
13 |
|
14 |
+
title = "COVID_19 Infection Detectation App!"
|
15 |
+
|
16 |
+
head = (
|
17 |
+
"<center>"
|
18 |
+
"<img src='covid/cd.png' width=400>"
|
19 |
+
"The robot was trained to classify chest xray image. To test it, Use the Example Images Provided or Upload your own xray images the space provided."
|
20 |
+
"</center>"
|
21 |
+
)
|
22 |
+
|
23 |
description = """
|
24 |
This Space demonstrates model based on efficientnet base model.
|
25 |
|
|
|
35 |
#["Covid Xray Image 7","covid/covid_1031.png"]
|
36 |
]
|
37 |
article="<p style='text-align: center'><a href='https://www.kaggle.com/datasets/anasmohammedtahir/covidqu' target='_blank'>COVID-QU-Ex Dataset</a></p>"
|
38 |
+
interpretation="default"
|
39 |
num_shap=5
|
40 |
enable_queue=True
|
41 |
|
42 |
|
43 |
+
gr.Interface(fn=predict_image, inputs=gr.Image(shape=(224,224)),
|
44 |
+
outputs = gr.Label(num_top_classes=3),title=title,description=description,examples=examples, article=article, interpretation=interpretation,enable_queue=enable_queue).launch(share=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|