Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
+
model_id = "knkarthick/TOPIC-DIALOGSUM"
|
4 |
+
|
5 |
+
generator = pipeline(task="text2text-generation", model=model_id)
|
6 |
+
|
7 |
+
def launch(input):
|
8 |
+
return generator(input)
|
9 |
+
|
10 |
+
iface = gr.Interface(launch, inputs="text", outputs="text")
|
11 |
+
iface.launch()
|