Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -99,17 +99,14 @@ def find_query(query,sen,nouns):
|
|
99 |
if n[1] == "NN":
|
100 |
|
101 |
noun_list.append(n[0])
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
# print(ea)
|
111 |
-
# print(ea.split("/"))
|
112 |
-
return noun_list
|
113 |
|
114 |
with gr.Blocks() as app:
|
115 |
inp = gr.Textbox(label="Paste Text",lines=10)
|
|
|
99 |
if n[1] == "NN":
|
100 |
|
101 |
noun_list.append(n[0])
|
102 |
+
nouns_l=list(nouns.keys())
|
103 |
+
for nn in nouns_l:
|
104 |
+
if nn in noun_list:
|
105 |
+
if nn in noun_box:
|
106 |
+
noun_box[str(nn)].append(nouns[nn])
|
107 |
+
else:
|
108 |
+
noun_box[str(nn)]=[nouns[nn]]
|
109 |
+
return noun_box
|
|
|
|
|
|
|
110 |
|
111 |
with gr.Blocks() as app:
|
112 |
inp = gr.Textbox(label="Paste Text",lines=10)
|