I duplicated an app with https://huggingface.co/spaces/innev/ChatGLM-6B-INT4 and also tried theminimal app from the tutorial: https://www.gradio.app/guides/creating-a-chatbot
Both of them do not require a GPU while a same error pops out, anyone knows what is happening?
Task exception was never retrieved
future: <Task finished name='tsbawo0iq9m_1' coro=<Queue.process_events() done, defined at /home/user/.local/lib/python3.10/site-packages/gradio/queueing.py:343> exception=1 validation error for PredictBody
event_id
Field required [type=missing, input_value={'fn_index': 1, 'data': [...on_hash': 'tsbawo0iq9m'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.1.2/v/missing>
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 347, in process_events
client_awake = await self.gather_event_data(event)
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 220, in gather_event_data
data, client_awake = await self.get_message(event, timeout=receive_timeout)
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 456, in get_message
return PredictBody(**data), True
File "/home/user/.local/lib/python3.10/site-packages/pydantic/main.py", line 150, in __init__
__pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody
event_id
Field required [type=missing, input_value={'fn_index': 1, 'data': [...on_hash': 'tsbawo0iq9m'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.1.2/v/missing
Task exception was never retrieved
future: <Task finished name='24iy8opwivr_1' coro=<Queue.process_events() done, defined at /home/user/.local/lib/python3.10/site-packages/gradio/queueing.py:343> exception=1 validation error for PredictBody
event_id
Field required [type=missing, input_value={'fn_index': 1, 'data': [...on_hash': '24iy8opwivr'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.1.2/v/missing>
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 347, in process_events
client_awake = await self.gather_event_data(event)
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 220, in gather_event_data
data, client_awake = await self.get_message(event, timeout=receive_timeout)
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 456, in get_message
return PredictBody(**data), True
File "/home/user/.local/lib/python3.10/site-packages/pydantic/main.py", line 150, in __init__
__pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody
event_id
Field required [type=missing, input_value={'fn_index': 1, 'data': [...on_hash': '24iy8opwivr'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.1.2/v/missing
The app.py in the tutorial I used is
import gradio as gr
import random
import time
# Chatbot demo with multimodal input (text, markdown, LaTeX, code blocks, image, audio, & video). Plus shows support for streaming text.
def add_text(history, text):
history = history + [(text, None)]
return history, gr.update(value="", interactive=False)
def add_file(history, file):
history = history + [((file.name,), None)]
return history
def bot(history):
response = "**That's cool!**"
history[-1][1] = ""
for character in response:
history[-1][1] += character
time.sleep(0.05)
yield history
with gr.Blocks() as demo:
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=750)
with gr.Row():
with gr.Column(scale=0.85):
txt = gr.Textbox(
show_label=False,
placeholder="Enter text and press enter, or upload an image",
).style(container=False)
with gr.Column(scale=0.15, min_width=0):
btn = gr.UploadButton("๐", file_types=["image", "video", "audio"])
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
bot, chatbot, chatbot
)
txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
bot, chatbot, chatbot
)
demo.queue()
demo.launch()