blazingbunny commited on
Commit
09d71fa
1 Parent(s): dfa043f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -47,8 +47,8 @@ def calculate_similarity(nouns_verbs, input_list):
47
  return similarities
48
 
49
  def process_inputs(text, json_file):
50
- # Read JSON data from the uploaded file
51
- input_list = json.load(json_file)
52
 
53
  nouns_verbs = identify_nouns_verbs(text)
54
  similarities = calculate_similarity(nouns_verbs, input_list)
@@ -67,4 +67,4 @@ iface = gr.Interface(
67
  )
68
 
69
  if __name__ == "__main__":
70
- iface.launch()
 
47
  return similarities
48
 
49
  def process_inputs(text, json_file):
50
+ # Convert NamedString to string and load JSON data
51
+ input_list = json.loads(json_file)
52
 
53
  nouns_verbs = identify_nouns_verbs(text)
54
  similarities = calculate_similarity(nouns_verbs, input_list)
 
67
  )
68
 
69
  if __name__ == "__main__":
70
+ iface.launch(share=True)