Spaces:
Sleeping
Sleeping
tjrtm commited on
Commit ·
991ec48
1
Parent(s): e2cf3e0
Switch to Gradio 3.50.2 to fix schema parsing errors
Browse files- Downgrade to Gradio 3.50.2 which doesn't have the JSON schema parsing bug
- Switch from gr.Blocks to gr.Interface (simpler, more stable API)
- Remove complex layouts that cause schema issues
- Use the classic Gradio interface pattern that's known to work
- This should finally resolve the 'TypeError: argument of type bool is not iterable' error
Files changed (3)
- .gitignore+1
- app.py+14-17
- requirements.txt+1-1
50 unmodified lines5152535450 unmodified lines*.jpeg*.gif
applog.log79 unmodified lines80818283838485868788899091929394959697989985868788899091929394959697989910310079 unmodified lines return "Error processing spell", None
# Create simple Gradio interface# Create simple Gradio 3.x interfacedef create_interface(): with gr.Blocks(title="Wizard Spells") as demo: gr.Markdown("# 🧙♂️ Magical Spell Visualizer 🪄") gr.Markdown("Click the button to generate a random magic spell with visualization!") generate_btn = gr.Button("Generate Magic Spell!", variant="primary") spell_output = gr.Textbox(label="Spell Description", lines=4) image_output = gr.Image(label="Spell Visualization") generate_btn.click( fn=get_random_spell_with_image, outputs=[spell_output, image_output] ) return demo interface = gr.Interface( fn=get_random_spell_with_image, inputs=[], outputs=[ gr.Textbox(label="Spell Description", lines=4), gr.Image(label="Spell Visualization", type="pil") ], title="🧙♂️ Magical Spell Visualizer 🪄", description="Click Submit to generate a random magic spell with visualization!", allow_flagging="never" ) return interface
if __name__ == "__main__": interface = create_interface() interface.launch(share=True) interface.launch()11234gradio==4.20.0gradio==3.50.2markdownifyrequestsduckduckgo_search.gitignore+1
app.py+14-17
requirements.txt+1-1