-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError
after updating gradio 3.47 to 4.16
#7492
Comments
Do you have a minimal reproduction for this that we can run ourselves? |
css = """img {object-fit: fill !important};footer {visibility: hidden};"""
with gr.Blocks(
css=css,
theme=gr.themes.Default(text_size=gr.themes.sizes.text_lg,
font=gr.themes.GoogleFont("Monospace"))
) as gradio_interface:
image_path = search_file_in_given_directory(
os.getcwd(),
"Ella-Logo-transparent.png"
)
gr.Image(
value=image_path,
width=150,
height=150,
interactive=False,
show_label=False,
show_download_button=False,
show_share_button=False,
container=False
)
analytics_enabled = False
gr.Markdown("MLToolkit demo, use any of the available tools!")
suggested_output_styles = [
"emotional",
"narrative",
"neutral",
"philosophical",
"sensational",
"suspenseful",
"polite"
]
with gr.Tab(Tools.STYLER):
input_styler_type = gr.Dropdown(
choices=suggested_output_styles,
value="emotional" ,
label="Design Output Style"
)
input_styler_text_ = gr.Textbox(lines=10, label="Input")
button_style = gr.Button("Formated Text in Style")
output_styler_text = gr.Textbox(lines=10, label="Output")
button_style.click(
rewrite_text_in_style,
inputs=[input_styler_text_, input_styler_type],
outputs=output_styler_text
) this is an example of a service calling gpt 4 in the background |
Can it be that the issue is because mounting takes place after the fastapi has already started because app_init() only is launched after uvicorn runs the fastapi application! So we cannot mount a gradio app to already running fast api? |
KeyError
after updating gradio 3.47 to 4.16
already solved |
Hi @Akin1995 what was the solution? |
I'm also experiencing this, and have a similar setup. What was the resolution? |
@Akin1995 I had the exact same error message when trying to upgrade from 3.50.2 to v4. What's your workaround? |
I use |
Using this version with the basic chat example, it just keeps hanging forever.... Clearly something is broken with FastAPI and Gradio interoperability. A bit annoying that the OP did not share their solution, can this issue be reopened? It gives different errors on the latest version, see this issue (I believe it is related): #8074 |
Great! it solved my issues; |
Describe the bug
I have updated gradio to 4.16 and now want to run my webapp with FastAPI but i get some error statements, what can i do ?
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: