Spaces:
Sleeping
Sleeping
Update app.py
Browse fileschanged output for website
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.
|
| 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 |
)
|