bharatcoder commited on
Commit
a3da674
·
verified ·
1 Parent(s): 9b6399c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -64,15 +64,16 @@ def smoldocling_readimage(image, prompt_text):
64
  return result.replace("<end_of_utterance>", "").strip()
65
 
66
  # Gradio UI
67
- demo = gr.Interface(
68
- fn=smoldocling_readimage,
69
- inputs=[
70
- gr.Image(type="pil", label="Upload Image"),
71
- gr.Textbox(lines=1, placeholder="Enter prompt (e.g. Convert to docling)", label="Prompt"),
72
- ],
73
- outputs="text",
74
- title="SmolDocling Web App",
75
- description="Upload a document image and convert it to structured docling format."
76
- )
 
77
 
78
- demo.launch(mcp_server=True)
 
64
  return result.replace("<end_of_utterance>", "").strip()
65
 
66
  # Gradio UI
67
+ with gr.Blocks() as demo:
68
+ gr.Markdown(
69
+ """
70
+ This is a MCP only tool for RS Studies
71
+ This connects to a remote chromadb instance.
72
+ This tool is MCP-only, so it does not have a UI.
73
+ """
74
+ )
75
+ gr.api(
76
+ smoldocling_readimage
77
+ )
78
 
79
+ _, url, _ = demo.launch(mcp_server=True)