elshehawy commited on
Commit
52ded96
β€’
1 Parent(s): 409f185

json.load instead of json.loads

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.loads(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)
 
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)