Spaces:
Sleeping
Sleeping
import os | |
os.system("pip3 install transformers") | |
import gradio as gr | |
from transformers import pipeline | |
pipe = pipeline("text-generation", model="nvidia/Llama-3_3-Nemotron-Super-49B-v1", trust_remote_code=True) | |
def textgen(request): | |
messages = [ | |
{"role": "user", "content": str(request)}, | |
] | |
outputs = pipe(messages) | |
return outputs[0]["generated_text"][-1]['content'] | |
demo = gr.Interface(fn=textgen, inputs="text", outputs="text") | |
demo.launch() |