SterlingWork commited on
Commit
9cf896b
·
verified ·
1 Parent(s): 58387b0

Update app.py

Browse files

changed output for website

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -36,10 +36,11 @@ def predict(text):
36
 
37
  return results
38
 
 
39
  demo = gr.Interface(
40
  fn=predict,
41
  inputs=gr.Textbox(label="Abstract", placeholder="Enter thesis abstract...", lines=5),
42
- outputs=gr.Label(num_top_classes=16, label="SDG Predictions"),
43
  title="SDG Thesis Classifier",
44
  description="Multi-label classification for UN Sustainable Development Goals"
45
  )
 
36
 
37
  return results
38
 
39
+ # Use gr.JSON output instead of gr.Label for API compatibility
40
  demo = gr.Interface(
41
  fn=predict,
42
  inputs=gr.Textbox(label="Abstract", placeholder="Enter thesis abstract...", lines=5),
43
+ outputs=gr.JSON(label="SDG Predictions"),
44
  title="SDG Thesis Classifier",
45
  description="Multi-label classification for UN Sustainable Development Goals"
46
  )