Naman Pundir
commited on
Commit
·
9e9434e
1
Parent(s):
f658876
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ models = {
|
|
7 |
"model_name": "facebook/bart-large-cnn",
|
8 |
"description": "Model 1",
|
9 |
},
|
10 |
-
"Model 2 ()": {
|
11 |
"model_name": "google/pegasus-multi_news",
|
12 |
"description": "Model 2",
|
13 |
},
|
@@ -28,11 +28,11 @@ def summarize_text(input_text, selected_model):
|
|
28 |
|
29 |
iface = gr.Interface(
|
30 |
fn=summarize_text,
|
31 |
-
inputs=[gr.inputs.Textbox(label="Input Text"), gr.inputs.Radio(
|
32 |
outputs="text",
|
33 |
title="Text Summarization App",
|
34 |
description="Choose a model for text summarization and enter the text to summarize.",
|
35 |
)
|
36 |
|
37 |
if __name__ == "__main__":
|
38 |
-
iface.launch()
|
|
|
7 |
"model_name": "facebook/bart-large-cnn",
|
8 |
"description": "Model 1",
|
9 |
},
|
10 |
+
"Model 2 (google/pegasus-multi_news)": {
|
11 |
"model_name": "google/pegasus-multi_news",
|
12 |
"description": "Model 2",
|
13 |
},
|
|
|
28 |
|
29 |
iface = gr.Interface(
|
30 |
fn=summarize_text,
|
31 |
+
inputs=[gr.inputs.Textbox(label="Input Text"), gr.inputs.Radio(list(models.keys()), label="Select Model")],
|
32 |
outputs="text",
|
33 |
title="Text Summarization App",
|
34 |
description="Choose a model for text summarization and enter the text to summarize.",
|
35 |
)
|
36 |
|
37 |
if __name__ == "__main__":
|
38 |
+
iface.launch()
|