ghosthets commited on
Commit
bdd9d8b
·
verified ·
1 Parent(s): 20b3d0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -17
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import os
2
  import json
3
- import gradio as gr
4
  from fastmcp import FastMCP
5
  from huggingface_hub import HfApi, model_info
6
 
@@ -33,20 +32,6 @@ def get_current_tags(repo_id: str) -> str:
33
  "error": str(e),
34
  })
35
 
36
- # Gradio UI wrapper
37
- def gradio_tag_checker(repo_id):
38
- return get_current_tags(repo_id)
39
-
40
- demo = gr.Interface(
41
- fn=gradio_tag_checker,
42
- inputs=gr.Textbox(label="Enter HuggingFace Model Repo ID", placeholder="e.g. bert-base-uncased"),
43
- outputs=gr.Textbox(label="Current Tags (JSON)"),
44
- title="🔖 HuggingFace Tag Checker",
45
- description="Uses FastMCP + HuggingFace Hub SDK to fetch current tags from any model repo."
46
- )
47
-
48
- # Run both FastMCP and Gradio safely
49
  if __name__ == "__main__":
50
- import threading
51
- threading.Thread(target=mcp.run, daemon=True).start()
52
- demo.launch(quiet=True, show_error=False) # ✅ Prevent uvicorn logging crash
 
1
  import os
2
  import json
 
3
  from fastmcp import FastMCP
4
  from huggingface_hub import HfApi, model_info
5
 
 
32
  "error": str(e),
33
  })
34
 
35
+ # Run MCP server only
 
 
 
 
 
 
 
 
 
 
 
 
36
  if __name__ == "__main__":
37
+ mcp.run()