Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from util import pipeline
|
|
5 |
import gradio as gr
|
6 |
cp_aug = 'minnehwg/finetune-newwiki-summarization-ver-augmented2'
|
7 |
|
8 |
-
|
9 |
def get_model(cp):
|
10 |
checkpoint = cp
|
11 |
tokenizer, model = load_model(checkpoint)
|
@@ -13,13 +13,6 @@ def get_model(cp):
|
|
13 |
|
14 |
tokenizer, model = get_model(cp_aug)
|
15 |
|
16 |
-
# demo = gr.Interface(
|
17 |
-
# fn=generate_summary,
|
18 |
-
# inputs=gr.Textbox(lines=2, placeholder="Enter your URL..."),
|
19 |
-
# outputs=gr.Textbox(label="Generated Text"),
|
20 |
-
# title="Chào mừng đến với hệ thống tóm tắt của Minne >.<",
|
21 |
-
# description="Enter the URL to summarize and click 'Submit' to generate the summary."
|
22 |
-
# )
|
23 |
|
24 |
def generate_summary(url):
|
25 |
results = pipeline(url, model, tokenizer)
|
|
|
5 |
import gradio as gr
|
6 |
cp_aug = 'minnehwg/finetune-newwiki-summarization-ver-augmented2'
|
7 |
|
8 |
+
|
9 |
def get_model(cp):
|
10 |
checkpoint = cp
|
11 |
tokenizer, model = load_model(checkpoint)
|
|
|
13 |
|
14 |
tokenizer, model = get_model(cp_aug)
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
def generate_summary(url):
|
18 |
results = pipeline(url, model, tokenizer)
|