Spaces:
Runtime error
Runtime error
refined the output by removing unwanted string characters from the generated dict. using a simple python slice method! :/
Browse files
app.py
CHANGED
@@ -30,7 +30,8 @@ cap = pipeline('image-to-text')
|
|
30 |
def predict(image):
|
31 |
cap = pipeline('image-to-text')
|
32 |
caption = cap(image)
|
33 |
-
|
|
|
34 |
|
35 |
|
36 |
input = gr.inputs.Image(label="Upload your Image and wait for 8-12 seconds!", type = 'pil', optional=False)
|
|
|
30 |
def predict(image):
|
31 |
cap = pipeline('image-to-text')
|
32 |
caption = cap(image)
|
33 |
+
output = str(caption)
|
34 |
+
return output[21:-4]
|
35 |
|
36 |
|
37 |
input = gr.inputs.Image(label="Upload your Image and wait for 8-12 seconds!", type = 'pil', optional=False)
|