Nighter commited on
Commit
a74e62b
1 Parent(s): 0d0475c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -51,7 +51,7 @@ def remove_parentheses(text):
51
  distilbert_base_uncased = pipeline(model="Nighter/QA_wiki_data_short_answer", from_tf=True)
52
  bert_base_uncased = pipeline(model="Nighter/QA_bert_base_uncased_wiki_data_short_answer", from_tf=True)
53
  roberta_base = pipeline(model="Nighter/QA_wiki_data_roberta_base_short_answer", from_tf=True)
54
- longformer_base = pipeline(model="Nighter/Fine-tuned-longformer-base")
55
 
56
  # Function to answer on all models
57
  def answer_questions(context, question):
@@ -74,22 +74,22 @@ with gr.Blocks() as app:
74
  gr.ClearButton([context_input,question_input])
75
  with gr.Column():
76
  with gr.Row():
77
- with gr.Column(scale=6):
78
  distilbert_base_uncased_output = gr.Textbox(lines=3, label="Distil BERT Base Uncased")
79
  with gr.Column(scale=2):
80
  distilbert_base_uncased_score = gr.Number(label="Distil BERT Base Uncased Score")
81
  with gr.Row():
82
- with gr.Column(scale=6):
83
  bert_base_uncased_output = gr.Textbox(lines=3, label="BERT Base Uncased")
84
  with gr.Column(scale=2):
85
  bert_base_uncased_score = gr.Number(label="BERT Base Uncased Score")
86
  with gr.Row():
87
- with gr.Column(scale=6):
88
  roberta_base_output = gr.Textbox(lines=3, label="RoBERTa Base")
89
  with gr.Column(scale=2):
90
  roberta_base_score = gr.Number(label="RoBERTa Base Score")
91
  with gr.Row():
92
- with gr.Column(scale=6):
93
  longformer_base_output = gr.Textbox(lines=3, label="Longformer Base")
94
  with gr.Column(scale=2):
95
  longformer_base_score = gr.Number(label="Longformer Base Score")
 
51
  distilbert_base_uncased = pipeline(model="Nighter/QA_wiki_data_short_answer", from_tf=True)
52
  bert_base_uncased = pipeline(model="Nighter/QA_bert_base_uncased_wiki_data_short_answer", from_tf=True)
53
  roberta_base = pipeline(model="Nighter/QA_wiki_data_roberta_base_short_answer", from_tf=True)
54
+ longformer_base = pipeline(model="aware-ai/longformer-squadv2")
55
 
56
  # Function to answer on all models
57
  def answer_questions(context, question):
 
74
  gr.ClearButton([context_input,question_input])
75
  with gr.Column():
76
  with gr.Row():
77
+ with gr.Column(scale=4):
78
  distilbert_base_uncased_output = gr.Textbox(lines=3, label="Distil BERT Base Uncased")
79
  with gr.Column(scale=2):
80
  distilbert_base_uncased_score = gr.Number(label="Distil BERT Base Uncased Score")
81
  with gr.Row():
82
+ with gr.Column(scale=4):
83
  bert_base_uncased_output = gr.Textbox(lines=3, label="BERT Base Uncased")
84
  with gr.Column(scale=2):
85
  bert_base_uncased_score = gr.Number(label="BERT Base Uncased Score")
86
  with gr.Row():
87
+ with gr.Column(scale=4):
88
  roberta_base_output = gr.Textbox(lines=3, label="RoBERTa Base")
89
  with gr.Column(scale=2):
90
  roberta_base_score = gr.Number(label="RoBERTa Base Score")
91
  with gr.Row():
92
+ with gr.Column(scale=4):
93
  longformer_base_output = gr.Textbox(lines=3, label="Longformer Base")
94
  with gr.Column(scale=2):
95
  longformer_base_score = gr.Number(label="Longformer Base Score")