Spaces:
Runtime error
Runtime error
Update
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
4 |
|
5 |
import os
|
6 |
import string
|
|
|
7 |
|
8 |
import gradio as gr
|
9 |
import PIL.Image
|
@@ -155,8 +156,9 @@ with gr.Blocks(css="style.css") as demo:
|
|
155 |
caption_output = gr.Textbox(label="Caption Output", show_label=False, container=False)
|
156 |
with gr.Tab(label="Visual Question Answering"):
|
157 |
chatbot = gr.Chatbot(label="VQA Chat", show_label=False)
|
158 |
-
|
159 |
-
|
|
|
160 |
vqa_input = gr.Text(label="Chat Input", show_label=False, max_lines=1, container=False)
|
161 |
with gr.Row():
|
162 |
clear_chat_button = gr.Button("Clear")
|
|
|
4 |
|
5 |
import os
|
6 |
import string
|
7 |
+
from multiprocessing import Manager
|
8 |
|
9 |
import gradio as gr
|
10 |
import PIL.Image
|
|
|
156 |
caption_output = gr.Textbox(label="Caption Output", show_label=False, container=False)
|
157 |
with gr.Tab(label="Visual Question Answering"):
|
158 |
chatbot = gr.Chatbot(label="VQA Chat", show_label=False)
|
159 |
+
multiprocessing_manager = Manager()
|
160 |
+
history_orig = gr.State(value=lambda: multiprocessing_manager.list())
|
161 |
+
history_qa = gr.State(value=lambda: multiprocessing_manager.list())
|
162 |
vqa_input = gr.Text(label="Chat Input", show_label=False, max_lines=1, container=False)
|
163 |
with gr.Row():
|
164 |
clear_chat_button = gr.Button("Clear")
|