Arnav Raina
commited on
Commit
·
8904ecb
1
Parent(s):
2c597e4
Update app.py
Browse files
app.py
CHANGED
@@ -16,20 +16,17 @@ def detect(files):
|
|
16 |
pred_ct = res["PRED_CT"],
|
17 |
geo_tag_url = res["GEO_TAG_URL"]
|
18 |
PRED.append(pred_ct)
|
19 |
-
return f"Predicted"
|
20 |
|
21 |
with gr.Blocks() as demo:
|
22 |
with gr.Row():
|
23 |
-
output=gr.
|
24 |
with gr.Row():
|
25 |
btn = gr.UploadButton(
|
26 |
label="Upload Image",
|
27 |
-
file_types
|
28 |
-
file_count
|
29 |
-
btn.upload(fn=detect, inputs=btn)
|
30 |
-
|
31 |
-
gr.Markdown(f"Output here")
|
32 |
-
if PRED is not None:
|
33 |
-
gr.Markdown(f"Predicted: {PRED}")
|
34 |
|
35 |
demo.launch()
|
|
|
16 |
pred_ct = res["PRED_CT"],
|
17 |
geo_tag_url = res["GEO_TAG_URL"]
|
18 |
PRED.append(pred_ct)
|
19 |
+
return f"Predicted: {PRED}"
|
20 |
|
21 |
with gr.Blocks() as demo:
|
22 |
with gr.Row():
|
23 |
+
output=gr.File()
|
24 |
with gr.Row():
|
25 |
btn = gr.UploadButton(
|
26 |
label="Upload Image",
|
27 |
+
file_types=[".jpg",".jpeg"],
|
28 |
+
file_count="multiple")
|
29 |
+
btn.upload(fn=detect, inputs=btn, outputs=gr.Label())
|
30 |
+
# put gr.Label() in upload(outputs=gr.Label())
|
|
|
|
|
|
|
31 |
|
32 |
demo.launch()
|