edersonmelo's picture
Add application file
6f333c0
raw
history blame contribute delete
435 Bytes
import gradio as gr
from transformers import pipeline
# troque o modelo por outro da sua coleção
MODEL = "Qwen/Qwen2.5-7B-Instruct"
pipe = pipeline("text-generation", model=MODEL)
def generate_text(prompt):
result = pipe(prompt, max_new_tokens=150)
return result[0]["generated_text"]
iface = gr.Interface(
fn=generate_text,
inputs="text",
outputs="text",
title="Teste - LLMs Essenciais"
)
iface.launch()