Spaces:
Runtime error
Runtime error
json.load instead of json.loads
Browse files
app.py
CHANGED
@@ -93,11 +93,11 @@ My latest exclusive for The Hill : Conservative frustration over Republican effo
|
|
93 |
|
94 |
"""
|
95 |
def find_orgs(uploaded_file):
|
96 |
-
uploaded_data = json.
|
97 |
return get_metrics_trf(uploaded_file)
|
98 |
# radio_btn = gr.Radio(choices=['GPT', 'iSemantics'], value='iSemantics', label='Available models', show_label=True)
|
99 |
# textbox = gr.Textbox(label="Enter your text", placeholder=str(all_metrics), lines=8)
|
100 |
upload_btn = gr.UploadButton(label='Upload a json file.')
|
101 |
|
102 |
-
iface = gr.Interface(fn=find_orgs, inputs=
|
103 |
iface.launch(share=True)
|
|
|
93 |
|
94 |
"""
|
95 |
def find_orgs(uploaded_file):
|
96 |
+
uploaded_data = json.load(uploaded_file)
|
97 |
return get_metrics_trf(uploaded_file)
|
98 |
# radio_btn = gr.Radio(choices=['GPT', 'iSemantics'], value='iSemantics', label='Available models', show_label=True)
|
99 |
# textbox = gr.Textbox(label="Enter your text", placeholder=str(all_metrics), lines=8)
|
100 |
upload_btn = gr.UploadButton(label='Upload a json file.')
|
101 |
|
102 |
+
iface = gr.Interface(fn=find_orgs, inputs=upload_btn, outputs="text")
|
103 |
iface.launch(share=True)
|