Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import pipeline
|
| 3 |
-
|
| 4 |
-
pipe = pipeline("text-generation", model="microsoft/DialoGPT-medium")
|
| 5 |
|
| 6 |
def chat(message, history):
|
| 7 |
-
|
| 8 |
-
return ""
|
| 9 |
-
|
| 10 |
-
response = pipe(message, max_length=100, pad_token_id=50256)
|
| 11 |
-
return response[0]["generated_text"]
|
| 12 |
|
| 13 |
gr.ChatInterface(fn=chat).launch()
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def chat(message, history):
|
| 4 |
+
return f"Queen: {message}"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
gr.ChatInterface(fn=chat).launch()
|