Spaces:
Sleeping
Sleeping
krishnapal2308
commited on
Commit
•
62d3fbb
1
Parent(s):
3a2d1fe
adding os.path for sample images
Browse files
app.py
CHANGED
@@ -45,10 +45,13 @@ def process_image_and_generate_output(image, model_selection):
|
|
45 |
# os.path.join(os.path.dirname(__file__), 'sample_images/3.jpg'),
|
46 |
# os.path.join(os.path.dirname(__file__), 'sample_images/4.jpg'), ]
|
47 |
sample_images = [
|
48 |
-
["sample_images/1.jpg"],
|
49 |
-
["sample_images/2.jpg"],
|
50 |
-
["sample_images/3.jpg"],
|
51 |
-
["sample_images/4.jpg"]
|
|
|
|
|
|
|
52 |
]
|
53 |
|
54 |
# Create a dropdown to select sample image
|
@@ -64,6 +67,7 @@ iface = gr.Interface(fn=process_image_and_generate_output,
|
|
64 |
inputs=[image_input, model_selection_input],
|
65 |
outputs=["text", "audio"],
|
66 |
examples=sample_images,
|
|
|
67 |
title="Eye For Blind | Image Captioning & TTS",
|
68 |
description="To be added")
|
69 |
|
|
|
45 |
# os.path.join(os.path.dirname(__file__), 'sample_images/3.jpg'),
|
46 |
# os.path.join(os.path.dirname(__file__), 'sample_images/4.jpg'), ]
|
47 |
sample_images = [
|
48 |
+
[os.path.join(os.path.dirname(__file__), "sample_images/1.jpg")],
|
49 |
+
[os.path.join(os.path.dirname(__file__), "sample_images/2.jpg")],
|
50 |
+
[os.path.join(os.path.dirname(__file__), "sample_images/3.jpg")],
|
51 |
+
[os.path.join(os.path.dirname(__file__), "sample_images/4.jpg")],
|
52 |
+
[os.path.join(os.path.dirname(__file__), "sample_images/5.jpg")],
|
53 |
+
[os.path.join(os.path.dirname(__file__), "sample_images/6.jpg")]
|
54 |
+
|
55 |
]
|
56 |
|
57 |
# Create a dropdown to select sample image
|
|
|
67 |
inputs=[image_input, model_selection_input],
|
68 |
outputs=["text", "audio"],
|
69 |
examples=sample_images,
|
70 |
+
allow_flagging='never',
|
71 |
title="Eye For Blind | Image Captioning & TTS",
|
72 |
description="To be added")
|
73 |
|