Spaces:
Runtime error
Runtime error
Mai Chí Bảo
commited on
Commit
·
f5611c9
1
Parent(s):
d5b4e6e
app change
Browse files
app.py
CHANGED
@@ -1,23 +1,14 @@
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
-
<<<<<<< HEAD
|
5 |
-
# I add a comt
|
6 |
-
# Initialize the summarization model
|
7 |
-
model = pipeline("summarization")
|
8 |
-
|
9 |
-
=======
|
10 |
-
|
11 |
model = pipeline(
|
12 |
"summarization",
|
13 |
)
|
14 |
-
>>>>>>> refs/remotes/origin/main
|
15 |
|
16 |
def predict(prompt):
|
17 |
summary = model(prompt)[0]["summary_text"]
|
18 |
return summary
|
19 |
|
20 |
-
|
21 |
# create an interface for the model
|
22 |
with gr.Interface(predict, "textbox", "text") as interface:
|
23 |
interface.launch()
|
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
model = pipeline(
|
5 |
"summarization",
|
6 |
)
|
|
|
7 |
|
8 |
def predict(prompt):
|
9 |
summary = model(prompt)[0]["summary_text"]
|
10 |
return summary
|
11 |
|
|
|
12 |
# create an interface for the model
|
13 |
with gr.Interface(predict, "textbox", "text") as interface:
|
14 |
interface.launch()
|