blazingbunny
commited on
Commit
•
5cf55d9
1
Parent(s):
09d71fa
Update app.py
Browse files
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 |
-
#
|
51 |
-
|
|
|
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)
|