Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -143,7 +143,7 @@ def demo_(sentence):
|
|
143 |
preds3=predict_for_example(sentence=sentence, tags=tags, model=model3)
|
144 |
preds2=predict_for_example(sentence=sentence, tags=tags, model=model2)
|
145 |
preds4=predict_for_example(sentence=sentence, tags=tags, model=model4)
|
146 |
-
return "predicted labels:\t"str(preds2)+"\n"+"predicted Noun chunks \t"str(get_noun_chunks(sentence=sentence, tags=tags,preds=preds2)),"predicted labels:\t"str(preds4)+"\n"+"predicted Noun chunks \t"str(get_noun_chunks(sentence=sentence, tags=tags,preds=preds4)),"predicted labels:\t"str(preds1)+"\n"+"predicted Noun chunks \t"str(get_noun_chunks(sentence=sentence, tags=tags,preds=preds1)),"predicted labels:\t"str(preds3)+"\n"+"predicted Noun chunks \t"str(get_noun_chunks(sentence=sentence, tags=tags,preds=preds3)),tags
|
147 |
|
148 |
title="POS-Tagged Corpus Analysis: Training a Recurrent Perceptron for Noun Chunk Identification"
|
149 |
demo = gr.Interface(fn=demo_, inputs=gr.Textbox(label="sentence for which you want noun chunks",lines=1, interactive=True, show_copy_button=True), outputs=[gr.Textbox(label="prediction on conditioned data with step activation function",lines=2, interactive=True, show_copy_button=True),gr.Textbox(label="prediction on conditioned data with step activation function",lines=2, interactive=True, show_copy_button=True),gr.Textbox(label="prediction on all data with step activation function",lines=2, interactive=True, show_copy_button=True),gr.Textbox(label="prediction on whole data with sigmoid activation function",lines=2, interactive=True, show_copy_button=True),gr.Textbox(label="pos tag label given by nltk library",lines=1, interactive=True, show_copy_button=True)],title=title)
|
|
|
143 |
preds3=predict_for_example(sentence=sentence, tags=tags, model=model3)
|
144 |
preds2=predict_for_example(sentence=sentence, tags=tags, model=model2)
|
145 |
preds4=predict_for_example(sentence=sentence, tags=tags, model=model4)
|
146 |
+
return "predicted labels:\t"+str(preds2)+"\n"+"predicted Noun chunks \t"+str(get_noun_chunks(sentence=sentence, tags=tags,preds=preds2)),"predicted labels:\t"+str(preds4)+"\n"+"predicted Noun chunks \t"+str(get_noun_chunks(sentence=sentence, tags=tags,preds=preds4)),"predicted labels:\t"+str(preds1)+"\n"+"predicted Noun chunks \t"+str(get_noun_chunks(sentence=sentence, tags=tags,preds=preds1)),"predicted labels:\t"+str(preds3)+"\n"+"predicted Noun chunks \t"+str(get_noun_chunks(sentence=sentence, tags=tags,preds=preds3)),tags
|
147 |
|
148 |
title="POS-Tagged Corpus Analysis: Training a Recurrent Perceptron for Noun Chunk Identification"
|
149 |
demo = gr.Interface(fn=demo_, inputs=gr.Textbox(label="sentence for which you want noun chunks",lines=1, interactive=True, show_copy_button=True), outputs=[gr.Textbox(label="prediction on conditioned data with step activation function",lines=2, interactive=True, show_copy_button=True),gr.Textbox(label="prediction on conditioned data with step activation function",lines=2, interactive=True, show_copy_button=True),gr.Textbox(label="prediction on all data with step activation function",lines=2, interactive=True, show_copy_button=True),gr.Textbox(label="prediction on whole data with sigmoid activation function",lines=2, interactive=True, show_copy_button=True),gr.Textbox(label="pos tag label given by nltk library",lines=1, interactive=True, show_copy_button=True)],title=title)
|