correction
Browse files
app.py
CHANGED
|
@@ -11,20 +11,9 @@ def predict(prompt,model_name, max_length):
|
|
| 11 |
model_name = "google/pegasus-xsum"
|
| 12 |
else:
|
| 13 |
model_name = model_name_converter[model_name]
|
| 14 |
-
print('la')
|
| 15 |
-
print(model_name)
|
| 16 |
-
print(max_length)
|
| 17 |
model = pipeline("summarization",model = model_name)
|
| 18 |
summary = model(prompt,max_length)[0]["summary_text"]
|
| 19 |
return summary
|
| 20 |
-
|
| 21 |
-
def extract_model(option):
|
| 22 |
-
if option ==None:
|
| 23 |
-
model_name = "google/pegasus-xsum"
|
| 24 |
-
else:
|
| 25 |
-
model_name = model_name_converter[option]
|
| 26 |
-
|
| 27 |
-
return print(model_name)
|
| 28 |
|
| 29 |
options_1 = model_name_converter.keys()
|
| 30 |
with gr.Blocks() as demo:
|
|
|
|
| 11 |
model_name = "google/pegasus-xsum"
|
| 12 |
else:
|
| 13 |
model_name = model_name_converter[model_name]
|
|
|
|
|
|
|
|
|
|
| 14 |
model = pipeline("summarization",model = model_name)
|
| 15 |
summary = model(prompt,max_length)[0]["summary_text"]
|
| 16 |
return summary
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
options_1 = model_name_converter.keys()
|
| 19 |
with gr.Blocks() as demo:
|