Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
generator = pipeline("text-generation", model="
|
| 5 |
|
| 6 |
def chat_fn(message, history=None):
|
| 7 |
try:
|
|
@@ -10,4 +10,5 @@ def chat_fn(message, history=None):
|
|
| 10 |
return bot_reply, history or []
|
| 11 |
except Exception as e:
|
| 12 |
return f"Error: {e}", history or []
|
|
|
|
| 13 |
gr.ChatInterface(fn=chat_fn).launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
generator = pipeline("text-generation", model="distilgpt2")
|
| 5 |
|
| 6 |
def chat_fn(message, history=None):
|
| 7 |
try:
|
|
|
|
| 10 |
return bot_reply, history or []
|
| 11 |
except Exception as e:
|
| 12 |
return f"Error: {e}", history or []
|
| 13 |
+
|
| 14 |
gr.ChatInterface(fn=chat_fn).launch()
|