Update to Gradio 6.x API
- Move css from gr.Blocks() to launch() - Replace show_api with footer_links parameter - Remove theme from Blocks (moved to launch in Gradio 6) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
4
main.py
4
main.py
@@ -126,11 +126,13 @@ def main():
|
||||
# Launch the app
|
||||
logger.info("Launching application...")
|
||||
try:
|
||||
# Gradio 6.x: show_api replaced with footer_links
|
||||
footer = ["api", "gradio"] if settings.api_enabled else ["gradio"]
|
||||
app.launch(
|
||||
server_name=settings.host,
|
||||
server_port=settings.gradio_port,
|
||||
share=False,
|
||||
show_api=settings.api_enabled,
|
||||
footer_links=footer,
|
||||
)
|
||||
except KeyboardInterrupt:
|
||||
logger.info("Shutting down...")
|
||||
|
||||
Reference in New Issue
Block a user