Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,10 +21,10 @@ tokenizer, model = get_model(cp_aug)
|
|
21 |
# )
|
22 |
|
23 |
def generate_summary(url):
|
24 |
-
|
|
|
25 |
return summary
|
26 |
|
27 |
-
# Tạo interface Gradio với hàm generate_summary
|
28 |
demo = gr.Interface(
|
29 |
fn=generate_summary,
|
30 |
inputs=gr.Textbox(lines=2, placeholder="Enter your URL..."),
|
@@ -33,7 +33,6 @@ demo = gr.Interface(
|
|
33 |
description="Enter the URL to summarize and click 'Submit' to generate the summary."
|
34 |
)
|
35 |
|
36 |
-
# Chạy interface
|
37 |
demo.launch(share=True)
|
38 |
|
39 |
|
|
|
21 |
# )
|
22 |
|
23 |
def generate_summary(url):
|
24 |
+
results = pipeline_function(url, model, tokenizer)
|
25 |
+
summary = "\n".join(results)
|
26 |
return summary
|
27 |
|
|
|
28 |
demo = gr.Interface(
|
29 |
fn=generate_summary,
|
30 |
inputs=gr.Textbox(lines=2, placeholder="Enter your URL..."),
|
|
|
33 |
description="Enter the URL to summarize and click 'Submit' to generate the summary."
|
34 |
)
|
35 |
|
|
|
36 |
demo.launch(share=True)
|
37 |
|
38 |
|