Spaces:
Runtime error
Runtime error
File size: 376 Bytes
c155a69 | 1 2 3 4 5 6 7 8 9 10 11 12 | from transformers import pipeline
import gradio as gr
generator = pipeline("text-generation", model="meta-llama/Llama-3-8B-Instruct")
def chat_with_ai(message):
output = generator(message, max_length=100, do_sample=True)
return output[0]['generated_text']
demo = gr.Interface(fn=chat_with_ai, inputs="text", outputs="text", title="TrainPy Assistant")
demo.launch()
|