Spaces:
Runtime error
Runtime error
Update app.py
Browse files102 unmodified lines103104105106107108109110111112113114115116117118119120121122123102 unmodified linesdemo = gr.Interface(fn=joke_generation,inputs=[gr.Textbox(label="categories", info="Comma‐separated list from [Any, Programming, …]"),gr.Dropdown(label="format", choices=["json"], info="Must be 'json'"),gr.Textbox(label="lang", placeholder="en", info="ISO 639-1 code for the joke’s language"),gr.Textbox(label="blacklistFlags", optional=True, info="Comma-sep flags to exclude: nsfw, religious, …"),gr.Checkbox(label="safe_mode", info="If True, enables safe-mode filter"),gr.Radio(label="type", choices=["single","twopart"], optional=True,info="If given, either 'single' or 'twopart'"),gr.Textbox(label="contains", optional=True, info="Substring that must appear in the joke"),gr.Textbox(label="idRange", optional=True, info="ID or range (e.g. '10-50')"),gr.Slider(label="amount", minimum=1, maximum=10, step=1, info="How many jokes to fetch (1–10)"),],outputs=gr.JSON(),api_name="joke_generation",)# Launch the interface and MCP serverif __name__ == "__main__":demo.launch(mcp_server=True)102 unmodified lines103104105106107108109110111112113114102 unmodified linesdemo = gr.Interface(fn=joke_generation,inputs="auto",outputs="auto",api_name="joke_generation",)# Launch the interface and MCP serverif __name__ == "__main__":demo.launch(mcp_server=True)
app.py+4-13