Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,7 @@ def get_nouns(text=text,steps=1):
|
|
50 |
sen_list=[]
|
51 |
noun_list={}
|
52 |
noun_box=[]
|
|
|
53 |
blob = TextBlob(text)
|
54 |
for sentence in blob.sentences:
|
55 |
sen_list.append(str(sentence))
|
@@ -57,6 +58,7 @@ def get_nouns(text=text,steps=1):
|
|
57 |
|
58 |
noun_box=[]
|
59 |
for ea in blob.parse().split(" "):
|
|
|
60 |
n=ea.split("/")
|
61 |
if n[1] == "NN":
|
62 |
noun_box.append(n[0])
|
@@ -175,7 +177,7 @@ def find_query(query,sen,nouns):
|
|
175 |
return noun_box,sen_box
|
176 |
|
177 |
with gr.Blocks() as app:
|
178 |
-
inp = gr.Textbox(label="Paste Text",lines=10)
|
179 |
btn = gr.Button("Load Document")
|
180 |
with gr.Row():
|
181 |
query=gr.Textbox(label="Search query")
|
|
|
50 |
sen_list=[]
|
51 |
noun_list={}
|
52 |
noun_box=[]
|
53 |
+
print(text)
|
54 |
blob = TextBlob(text)
|
55 |
for sentence in blob.sentences:
|
56 |
sen_list.append(str(sentence))
|
|
|
58 |
|
59 |
noun_box=[]
|
60 |
for ea in blob.parse().split(" "):
|
61 |
+
print(ea)
|
62 |
n=ea.split("/")
|
63 |
if n[1] == "NN":
|
64 |
noun_box.append(n[0])
|
|
|
177 |
return noun_box,sen_box
|
178 |
|
179 |
with gr.Blocks() as app:
|
180 |
+
inp = gr.Textbox(label="Paste Text",value=text,lines=10)
|
181 |
btn = gr.Button("Load Document")
|
182 |
with gr.Row():
|
183 |
query=gr.Textbox(label="Search query")
|