Spaces:
Runtime error
Runtime error
Commit
·
b309611
1
Parent(s):
84b29d0
Update app.py
Browse files
app.py
CHANGED
@@ -78,8 +78,23 @@ para_demo = gr.Interface(
|
|
78 |
inputs="text",
|
79 |
outputs=gr.Textbox(lines=10, label="T5 Paraphrase Output")
|
80 |
)
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
if __name__ == "__main__":
|
83 |
-
Parallel(t5_demo, bert_demo, para_demo,
|
84 |
-
inputs=gr.Textbox(lines=10, label="Input Text", placeholder="Enter article here..."),
|
85 |
-
title="Summary of Summarizer - Indonesia").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
inputs="text",
|
79 |
outputs=gr.Textbox(lines=10, label="T5 Paraphrase Output")
|
80 |
)
|
81 |
+
def summarize(text):
|
82 |
+
t5_ = summ_t5(text)
|
83 |
+
bert_ = summ_bert(text)
|
84 |
+
para_ = para_t5(t5_)
|
85 |
+
return t5_, bert_, para_
|
86 |
|
87 |
if __name__ == "__main__":
|
88 |
+
#Parallel(t5_demo, bert_demo, para_demo,
|
89 |
+
#inputs=gr.Textbox(lines=10, label="Input Text", placeholder="Enter article here..."),
|
90 |
+
#title="Summary of Summarizer - Indonesia").launch()
|
91 |
+
with gr.Blocks():
|
92 |
+
with gr.Row():
|
93 |
+
with gr.Column():
|
94 |
+
input_text = gr.Textbox(label="Input Text")
|
95 |
+
analyze_button = gr.Button(label="Analyze")
|
96 |
+
with gr.Column():
|
97 |
+
t5_output = gr.Label(label="T5 Base Output")
|
98 |
+
bert_output = gr.Textbox(label="Bert Base Output")
|
99 |
+
para_output = gr.Textbox(label="T5 Paraphrase Output")
|
100 |
+
analyze_button.click(summarize, input_text, [t5_output, bert_output, para_output])
|