Spaces:
Runtime error
Runtime error
add try except
Browse files
app.py
CHANGED
@@ -96,7 +96,14 @@ def find_orgs(uploaded_file):
|
|
96 |
print('=*'*80)
|
97 |
print(type(uploaded_file))
|
98 |
print(uploaded_file)
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
return get_metrics_trf(uploaded_file)
|
101 |
# radio_btn = gr.Radio(choices=['GPT', 'iSemantics'], value='iSemantics', label='Available models', show_label=True)
|
102 |
# textbox = gr.Textbox(label="Enter your text", placeholder=str(all_metrics), lines=8)
|
|
|
96 |
print('=*'*80)
|
97 |
print(type(uploaded_file))
|
98 |
print(uploaded_file)
|
99 |
+
try:
|
100 |
+
print('inside try')
|
101 |
+
uploaded_data = json.load(uploaded_file)
|
102 |
+
|
103 |
+
except:
|
104 |
+
print('inside except')
|
105 |
+
uploaded_data = json.loads(uploaded_file)
|
106 |
+
|
107 |
return get_metrics_trf(uploaded_file)
|
108 |
# radio_btn = gr.Radio(choices=['GPT', 'iSemantics'], value='iSemantics', label='Available models', show_label=True)
|
109 |
# textbox = gr.Textbox(label="Enter your text", placeholder=str(all_metrics), lines=8)
|