update port
Browse files
app.py
CHANGED
@@ -153,15 +153,9 @@ def reset_state():
|
|
153 |
with gr.Blocks(scale=4) as demo:
|
154 |
gr.HTML("""<h1 align="center">PandaGPT</h1>""")
|
155 |
|
156 |
-
with gr.Row(scale=
|
157 |
with gr.Column(scale=1):
|
158 |
image_path = gr.Image(type="filepath", label="Image", value=None)
|
159 |
-
# with gr.Column(scale=1):
|
160 |
-
# audio_path = gr.Audio(type="filepath", label="Audio", value=None)
|
161 |
-
# with gr.Column(scale=1):
|
162 |
-
# video_path = gr.Video(type='file', label="Video")
|
163 |
-
# with gr.Column(scale=1):
|
164 |
-
# thermal_path = gr.Image(type="filepath", label="Thermal Image", value=None)
|
165 |
|
166 |
chatbot = gr.Chatbot().style(height=300)
|
167 |
with gr.Row():
|
@@ -186,9 +180,6 @@ with gr.Blocks(scale=4) as demo:
|
|
186 |
predict, [
|
187 |
user_input,
|
188 |
image_path,
|
189 |
-
# audio_path,
|
190 |
-
# video_path,
|
191 |
-
# thermal_path,
|
192 |
chatbot,
|
193 |
max_length,
|
194 |
top_p,
|
@@ -207,9 +198,6 @@ with gr.Blocks(scale=4) as demo:
|
|
207 |
re_predict, [
|
208 |
user_input,
|
209 |
image_path,
|
210 |
-
# audio_path,
|
211 |
-
# video_path,
|
212 |
-
# thermal_path,
|
213 |
chatbot,
|
214 |
max_length,
|
215 |
top_p,
|
@@ -227,12 +215,9 @@ with gr.Blocks(scale=4) as demo:
|
|
227 |
submitBtn.click(reset_user_input, [], [user_input])
|
228 |
emptyBtn.click(reset_state, outputs=[
|
229 |
image_path,
|
230 |
-
# audio_path,
|
231 |
-
# video_path,
|
232 |
-
# thermal_path,
|
233 |
chatbot,
|
234 |
history,
|
235 |
modality_cache
|
236 |
], show_progress=True)
|
237 |
|
238 |
-
demo.queue().launch(
|
|
|
153 |
with gr.Blocks(scale=4) as demo:
|
154 |
gr.HTML("""<h1 align="center">PandaGPT</h1>""")
|
155 |
|
156 |
+
with gr.Row(scale=1):
|
157 |
with gr.Column(scale=1):
|
158 |
image_path = gr.Image(type="filepath", label="Image", value=None)
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
chatbot = gr.Chatbot().style(height=300)
|
161 |
with gr.Row():
|
|
|
180 |
predict, [
|
181 |
user_input,
|
182 |
image_path,
|
|
|
|
|
|
|
183 |
chatbot,
|
184 |
max_length,
|
185 |
top_p,
|
|
|
198 |
re_predict, [
|
199 |
user_input,
|
200 |
image_path,
|
|
|
|
|
|
|
201 |
chatbot,
|
202 |
max_length,
|
203 |
top_p,
|
|
|
215 |
submitBtn.click(reset_user_input, [], [user_input])
|
216 |
emptyBtn.click(reset_state, outputs=[
|
217 |
image_path,
|
|
|
|
|
|
|
218 |
chatbot,
|
219 |
history,
|
220 |
modality_cache
|
221 |
], show_progress=True)
|
222 |
|
223 |
+
demo.queue().launch(enable_queue=True)
|