tahsinova-ai / app.py
TASOMM's picture
Update app.py
ff5021e verified
raw
history blame contribute delete
332 Bytes
import gradio as gr
from transformers import pipeline
# Küçük model (çalışması garanti)
pipe = pipeline("text2text-generation", model="google/flan-t5-small")
def chat_fn(message, history):
response = pipe(message, max_length=200)
return response[0]["generated_text"]
demo = gr.ChatInterface(chat_fn)
demo.launch()