Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def get_nouns(text=text,steps=1):
|
|
60 |
sen_list=[]
|
61 |
noun_list={}
|
62 |
noun_box=[]
|
63 |
-
print(text)
|
64 |
blob = TextBlob(text)
|
65 |
for sentence in blob.sentences:
|
66 |
sen_list.append(str(sentence))
|
@@ -76,7 +76,9 @@ def get_nouns(text=text,steps=1):
|
|
76 |
|
77 |
print(sen_list)
|
78 |
key_cnt=len(sen_list)
|
|
|
79 |
print(key_cnt)
|
|
|
80 |
cnt=0
|
81 |
go=True
|
82 |
a="Z"
|
@@ -89,10 +91,10 @@ def get_nouns(text=text,steps=1):
|
|
89 |
#for iii in
|
90 |
noun_list[f'{control_val[i]}{control_char[ii]}']=sent
|
91 |
|
92 |
-
if cnt ==
|
93 |
print('done')
|
94 |
go=False
|
95 |
-
print(list(
|
96 |
else:
|
97 |
cnt+=1
|
98 |
return json_object,noun_list
|
|
|
60 |
sen_list=[]
|
61 |
noun_list={}
|
62 |
noun_box=[]
|
63 |
+
#print(text)
|
64 |
blob = TextBlob(text)
|
65 |
for sentence in blob.sentences:
|
66 |
sen_list.append(str(sentence))
|
|
|
76 |
|
77 |
print(sen_list)
|
78 |
key_cnt=len(sen_list)
|
79 |
+
noun_cnt=len(noun_box)
|
80 |
print(key_cnt)
|
81 |
+
|
82 |
cnt=0
|
83 |
go=True
|
84 |
a="Z"
|
|
|
91 |
#for iii in
|
92 |
noun_list[f'{control_val[i]}{control_char[ii]}']=sent
|
93 |
|
94 |
+
if cnt == noun_cnt-1:
|
95 |
print('done')
|
96 |
go=False
|
97 |
+
print(list(noun_list.keys())[-1])
|
98 |
else:
|
99 |
cnt+=1
|
100 |
return json_object,noun_list
|