Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,16 +12,24 @@ def get_model():
|
|
12 |
|
13 |
tokenizer, model = get_model()
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
demo.launch()
|
27 |
|
|
|
12 |
|
13 |
tokenizer, model = get_model()
|
14 |
|
15 |
+
# demo = gr.Interface(
|
16 |
+
# fn=generate_summary,
|
17 |
+
# inputs=gr.Textbox(lines=2, placeholder="Enter your URL..."),
|
18 |
+
# outputs=gr.Textbox(label="Generated Text"),
|
19 |
+
# title="Chào mừng đến với hệ thống tóm tắt của Minne >.<",
|
20 |
+
# description="Enter the URL to summarize and click 'Submit' to generate the summary."
|
21 |
+
# )
|
22 |
+
|
23 |
+
def generate(text):
|
24 |
+
return pipeline(text, )
|
25 |
+
|
26 |
+
with gr.Blocks() as demo:
|
27 |
+
gr.Markdown("Start typing below and then click **Run** to see the output.")
|
28 |
+
with gr.Row():
|
29 |
+
inp = gr.Textbox(placeholder="Enter your URL")
|
30 |
+
out = gr.Textbox()
|
31 |
+
btn = gr.Button("Run")
|
32 |
+
btn.click(fn=generate, inputs=inp, outputs=out)
|
33 |
|
34 |
demo.launch()
|
35 |
|