Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -59,9 +59,10 @@ def proc_nouns(sen_list):
|
|
59 |
noun_list[str(nnn)]=[nn]
|
60 |
return noun_list
|
61 |
|
62 |
-
def get_nouns(text=text
|
63 |
control_len=control_json['leng']-steps
|
64 |
-
control_char=list(control_json['control']
|
|
|
65 |
control_val=list(control_json['control'][control_len:])
|
66 |
char_len=len(control_char)
|
67 |
val_len=len(control_val)
|
@@ -233,7 +234,6 @@ with gr.Blocks() as app:
|
|
233 |
with gr.Row():
|
234 |
query=gr.Textbox(label="Search query")
|
235 |
search_btn=gr.Button("Search")
|
236 |
-
steps=gr.Number(value=1)
|
237 |
out_box=gr.Textbox(label="Results")
|
238 |
sen_box=gr.Textbox(label="Sentences")
|
239 |
with gr.Row():
|
@@ -242,7 +242,7 @@ with gr.Blocks() as app:
|
|
242 |
with gr.Column(scale=1):
|
243 |
nouns=gr.JSON(label="Nouns")
|
244 |
search_btn.click(find_query,[query,sen,nouns],[out_box,sen_box])
|
245 |
-
btn.click(get_nouns,[inp
|
246 |
app.launch()
|
247 |
|
248 |
|
|
|
59 |
noun_list[str(nnn)]=[nn]
|
60 |
return noun_list
|
61 |
|
62 |
+
def get_nouns(text=text):
|
63 |
control_len=control_json['leng']-steps
|
64 |
+
control_char=list(control_json['control'])
|
65 |
+
control_char_val=list(control_json['control'][:control_len])
|
66 |
control_val=list(control_json['control'][control_len:])
|
67 |
char_len=len(control_char)
|
68 |
val_len=len(control_val)
|
|
|
234 |
with gr.Row():
|
235 |
query=gr.Textbox(label="Search query")
|
236 |
search_btn=gr.Button("Search")
|
|
|
237 |
out_box=gr.Textbox(label="Results")
|
238 |
sen_box=gr.Textbox(label="Sentences")
|
239 |
with gr.Row():
|
|
|
242 |
with gr.Column(scale=1):
|
243 |
nouns=gr.JSON(label="Nouns")
|
244 |
search_btn.click(find_query,[query,sen,nouns],[out_box,sen_box])
|
245 |
+
btn.click(get_nouns,[inp],[sen,nouns])
|
246 |
app.launch()
|
247 |
|
248 |
|