Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
"""
|
|
@@ -16,7 +17,8 @@ def respond(
|
|
| 16 |
top_p,
|
| 17 |
):
|
| 18 |
messages = [{"role": "system", "content": system_message}]
|
| 19 |
-
|
|
|
|
| 20 |
for val in history:
|
| 21 |
if val[0]:
|
| 22 |
messages.append({"role": "user", "content": val[0]})
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
| 5 |
"""
|
|
|
|
| 17 |
top_p,
|
| 18 |
):
|
| 19 |
messages = [{"role": "system", "content": system_message}]
|
| 20 |
+
pipe = pipeline("text-generation", model="datatab/Yugo60-GPT")
|
| 21 |
+
pipe(messages)
|
| 22 |
for val in history:
|
| 23 |
if val[0]:
|
| 24 |
messages.append({"role": "user", "content": val[0]})
|