DelaliScratchwerk commited on
Commit
8ac19c7
·
verified ·
1 Parent(s): ac77253

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -76,8 +76,13 @@ with gr.Blocks(title="Text → Time Period (SetFit)") as demo:
76
  scores = gr.JSON(label="Scores")
77
 
78
  btn = gr.Button("Submit", variant="primary")
79
- # 👇 Explicit, stable API route (your Space docs will show /api/predict)
80
- btn.click(predict, inputs=text, outputs=[pred, reason, scores], api_name="/predict")
 
 
 
 
 
81
 
82
  gr.Examples(
83
  examples=[
 
76
  scores = gr.JSON(label="Scores")
77
 
78
  btn = gr.Button("Submit", variant="primary")
79
+ # Stable API route name; HTTP endpoint will be /api/predict
80
+ btn.click(
81
+ predict,
82
+ inputs=text,
83
+ outputs=[pred, reason, scores],
84
+ api_name="predict"
85
+ )
86
 
87
  gr.Examples(
88
  examples=[