Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -92,6 +92,10 @@ tokenizer.pad_token = tokenizer.unk_token
|
|
92 |
|
93 |
# return generated_caption
|
94 |
|
|
|
|
|
|
|
|
|
95 |
def predict_event(image):
|
96 |
|
97 |
|
@@ -122,16 +126,16 @@ description = "final capstone"
|
|
122 |
|
123 |
iface = gr.Interface(predict_event,
|
124 |
#inputs=["image"],
|
125 |
-
gr.Image(type="
|
126 |
outputs=["text"] )
|
127 |
|
128 |
|
129 |
|
130 |
-
|
131 |
# app = gr.mount_gradio_app(app, iface, path="/")
|
132 |
|
133 |
# iface.launch(server_name = "0.0.0.0", server_port = 8001,share=True)
|
134 |
-
|
135 |
# if __name__ == "__main__":
|
136 |
# Use this for debugging purposes only
|
137 |
|
|
|
92 |
|
93 |
# return generated_caption
|
94 |
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
def predict_event(image):
|
100 |
|
101 |
|
|
|
126 |
|
127 |
iface = gr.Interface(predict_event,
|
128 |
#inputs=["image"],
|
129 |
+
gr.Image(type="pil"),
|
130 |
outputs=["text"] )
|
131 |
|
132 |
|
133 |
|
134 |
+
iface.launch()
|
135 |
# app = gr.mount_gradio_app(app, iface, path="/")
|
136 |
|
137 |
# iface.launch(server_name = "0.0.0.0", server_port = 8001,share=True)
|
138 |
+
|
139 |
# if __name__ == "__main__":
|
140 |
# Use this for debugging purposes only
|
141 |
|