Gianpaolo Macario commited on
Commit
7390cf0
Β·
1 Parent(s): d5a02fb

fix(app): temporarily switch to Gradio app launch

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -283,8 +283,8 @@ Please process all {len(all_tags)} tags: {", ".join(all_tags)}
283
  spec = importlib.util.spec_from_file_location(
284
  "mcp_server", "./mcp_server.py"
285
  )
286
- mcp_module = importlib.util.module_from_spec(spec)
287
- spec.loader.exec_module(mcp_module)
288
 
289
  # Use the MCP tools directly for each tag
290
  for tag in all_tags:
@@ -524,4 +524,13 @@ if __name__ == "__main__":
524
  print("πŸš€ Starting HF Tagging Bot...")
525
  print("πŸ“Š Dashboard: http://localhost:7860/gradio")
526
  print("πŸ”— Webhook: http://localhost:7860/webhook")
527
- uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)
 
 
 
 
 
 
 
 
 
 
283
  spec = importlib.util.spec_from_file_location(
284
  "mcp_server", "./mcp_server.py"
285
  )
286
+ mcp_module = importlib.util.module_from_spec(spec) # type: ignore
287
+ spec.loader.exec_module(mcp_module) # type: ignore
288
 
289
  # Use the MCP tools directly for each tag
290
  for tag in all_tags:
 
524
  print("πŸš€ Starting HF Tagging Bot...")
525
  print("πŸ“Š Dashboard: http://localhost:7860/gradio")
526
  print("πŸ”— Webhook: http://localhost:7860/webhook")
527
+ #
528
+ # QUICK-AND-DIRTY TEST WITHOUT uvicorn
529
+ #
530
+ # uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)
531
+ #
532
+ gradio_app = create_gradio_app()
533
+ gradio_app.launch()
534
+
535
+
536
+ # EOF