Omnibus commited on
Commit
8eb51bf
·
verified ·
1 Parent(s): 39fe403

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -11
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
- # for nn in list(nouns.keys()):
103
-
104
- # if nn in noun_list:
105
-
106
-
107
- # noun_box[n[0]]
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)