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 lines51525350 unmodified lines*.jpeg*.gif50 unmodified lines5152535450 unmodified lines*.jpeg*.gifapplog.log
79 unmodified lines808182838485868788899091929394959697989910010110210379 unmodified linesreturn "Error processing spell", None# Create simple Gradio 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 demoif __name__ == "__main__":interface = create_interface()interface.launch(share=True)79 unmodified lines808182838485868788899091929394959697989910079 unmodified linesreturn "Error processing spell", None# Create simple Gradio 3.x interfacedef create_interface():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 interfaceif __name__ == "__main__":interface = create_interface()interface.launch()
1234gradio==4.20.0markdownifyrequestsduckduckgo_search1234gradio==3.50.2markdownifyrequestsduckduckgo_search
.gitignore+1
app.py+14-17
requirements.txt+1-1