Spaces:
Sleeping
Sleeping
File size: 504 Bytes
522fd1b 8d5b6b3 11a4987 522fd1b 11a4987 522fd1b 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 22 23 |
import spaces
import gradio as gr
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="NousResearch/Hermes-3-Llama-3.1-8B")
@spaces.GPU(duration=120)
def llama3_1_8B(question):
messages = [
{"role": "user", "content": question},
]
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()
|