Spaces:
Sleeping
Sleeping
Commit
·
dfa0bd7
1
Parent(s):
4efedce
Use JSON
Browse filesSigned-off-by: avsolatorio <[email protected]>
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import wbgtopic
|
| 3 |
|
|
@@ -7,7 +8,7 @@ clf = wbgtopic.WBGDocTopic()
|
|
| 7 |
|
| 8 |
|
| 9 |
def fn(inputs):
|
| 10 |
-
return clf.suggest_topics(inputs)
|
| 11 |
|
| 12 |
|
| 13 |
with gr.Blocks(title="WBG-Document-Topic-Classifier") as demo:
|
|
|
|
| 1 |
+
import json
|
| 2 |
import gradio as gr
|
| 3 |
import wbgtopic
|
| 4 |
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
def fn(inputs):
|
| 11 |
+
return json.dumps(clf.suggest_topics(inputs), indent=2)
|
| 12 |
|
| 13 |
|
| 14 |
with gr.Blocks(title="WBG-Document-Topic-Classifier") as demo:
|