Spaces:
Sleeping
Sleeping
File size: 468 Bytes
8d5b6b3 11a4987 06a704c 11a4987 8d5b6b3 3f7015b 8d5b6b3 11a4987 8d5b6b3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
# Use a pipeline as a high-level helper
from transformers import pipeline
def llama3_1_8B(question):
messages = [
{"role": "user", "content": question},
]
pipe = pipeline("text-generation", model="NousResearch/Hermes-3-Llama-3.1-8B")
responses = pipe(messages)
return str(responses)
def greet(name):
return "Hello " + name + "!!???"
demo = gr.Interface(fn=llama3_1_8B, inputs="text", outputs="text")
demo.launch()
|