Spaces:
Runtime error
Runtime error
Commit
Β·
869cbdf
1
Parent(s):
cfe136c
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,8 +66,10 @@ def predict(imageurl):
|
|
| 66 |
# nucleus sampling
|
| 67 |
# caption = model.generate(image, sample=True, top_p=0.9, max_length=20, min_length=5)
|
| 68 |
return('caption: '+caption[0])
|
|
|
|
| 69 |
demo = gr.Interface(fn=predict,
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
| 73 |
demo.launch()
|
|
|
|
| 66 |
# nucleus sampling
|
| 67 |
# caption = model.generate(image, sample=True, top_p=0.9, max_length=20, min_length=5)
|
| 68 |
return('caption: '+caption[0])
|
| 69 |
+
|
| 70 |
demo = gr.Interface(fn=predict,
|
| 71 |
+
inputs="text",
|
| 72 |
+
outputs=gr.outputs.Label(num_top_classes=3)
|
| 73 |
+
)
|
| 74 |
+
|
| 75 |
demo.launch()
|