Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
from transformers.pipelines.conversational import Conversation
|
4 |
+
|
5 |
+
def ama_func(x):
|
6 |
+
conversation = Conversation(x)
|
7 |
+
return conversational_pipeline(conversation)
|
8 |
+
|
9 |
+
|
10 |
+
demo = gr.Interface(
|
11 |
+
fn = ama_func,
|
12 |
+
inputs = gr.Textbox(label="Hey, Bakayaro I'm the salty conversation bot 🤨", placeholder = 'Enter your question here....', lines = 3),
|
13 |
+
outputs = 'text',
|
14 |
+
)
|
15 |
+
|
16 |
+
demo.launch()
|
17 |
+
|