Spaces:
Sleeping
Sleeping
medmediani
commited on
Commit
·
946c41f
1
Parent(s):
f9f6585
Changed the model path
Browse files- .ipynb_checkpoints/app-checkpoint.py +3 -2
- app.py +3 -2
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -24,12 +24,13 @@ def generate_kws(context,num_kw):
|
|
24 |
|
25 |
|
26 |
inputs=gr.Textbox(value="", lines=5, label="Input Context",elem_id="inp_div")
|
27 |
-
nkws = gr.Textbox(label="Number of keywords to extract",elem_id="inp_div")
|
|
|
28 |
outputs=gr.Textbox(label="Generated Keywords",lines=6,elem_id="inp_div")
|
29 |
|
30 |
demo = gr.Interface(
|
31 |
generate_kws,
|
32 |
-
[inputs,nkws],
|
33 |
outputs,
|
34 |
title="Keyword Extraction Model",
|
35 |
css=".gradio-container {background-color: lightgray} #inp_div {background-color: #7FB3D5;}",
|
|
|
24 |
|
25 |
|
26 |
inputs=gr.Textbox(value="", lines=5, label="Input Context",elem_id="inp_div")
|
27 |
+
nkws = gr.Textbox(label="Number of keywords to extract",default="3",elem_id="inp_div")
|
28 |
+
kw_ngs= gr.Textbox(label="Maximum number of ngrams per keyword",default="3",elem_id="inp_div")
|
29 |
outputs=gr.Textbox(label="Generated Keywords",lines=6,elem_id="inp_div")
|
30 |
|
31 |
demo = gr.Interface(
|
32 |
generate_kws,
|
33 |
+
[inputs,nkws,kw_ngs],
|
34 |
outputs,
|
35 |
title="Keyword Extraction Model",
|
36 |
css=".gradio-container {background-color: lightgray} #inp_div {background-color: #7FB3D5;}",
|
app.py
CHANGED
@@ -24,12 +24,13 @@ def generate_kws(context,num_kw):
|
|
24 |
|
25 |
|
26 |
inputs=gr.Textbox(value="", lines=5, label="Input Context",elem_id="inp_div")
|
27 |
-
nkws = gr.Textbox(label="Number of keywords to extract",elem_id="inp_div")
|
|
|
28 |
outputs=gr.Textbox(label="Generated Keywords",lines=6,elem_id="inp_div")
|
29 |
|
30 |
demo = gr.Interface(
|
31 |
generate_kws,
|
32 |
-
[inputs,nkws],
|
33 |
outputs,
|
34 |
title="Keyword Extraction Model",
|
35 |
css=".gradio-container {background-color: lightgray} #inp_div {background-color: #7FB3D5;}",
|
|
|
24 |
|
25 |
|
26 |
inputs=gr.Textbox(value="", lines=5, label="Input Context",elem_id="inp_div")
|
27 |
+
nkws = gr.Textbox(label="Number of keywords to extract",default="3",elem_id="inp_div")
|
28 |
+
kw_ngs= gr.Textbox(label="Maximum number of ngrams per keyword",default="3",elem_id="inp_div")
|
29 |
outputs=gr.Textbox(label="Generated Keywords",lines=6,elem_id="inp_div")
|
30 |
|
31 |
demo = gr.Interface(
|
32 |
generate_kws,
|
33 |
+
[inputs,nkws,kw_ngs],
|
34 |
outputs,
|
35 |
title="Keyword Extraction Model",
|
36 |
css=".gradio-container {background-color: lightgray} #inp_div {background-color: #7FB3D5;}",
|