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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -47,8 +47,9 @@ def calculate_similarity(nouns_verbs, input_list):
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)
 
47
  return similarities
48
 
49
  def process_inputs(text, json_file):
50
+ # Read the content of the uploaded file
51
+ with open(json_file.name, 'r') as f:
52
+ input_list = json.load(f)
53
 
54
  nouns_verbs = identify_nouns_verbs(text)
55
  similarities = calculate_similarity(nouns_verbs, input_list)