Spaces:
Runtime error
Runtime error
File size: 349 Bytes
da47371 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="agentica-org/DeepCoder-14B-Preview",
device="cuda"
)
def chat(message, history):
messages = [{"role": "user", "content": message}]
response = pipe(messages)
return response[0]["generated_text"]
gr.ChatInterface(chat).launch() |