Update app.py
Browse files1234456712 unmodified lines2021222324252623242526272829import gradio as grfrom transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "burhanmt/destilgpt2-turkish" # Türkçe hızlı modelmodel_name = "akoksal/turkish-gpt2-small" # ÇALIŞAN TÜRKÇE MODEL
tokenizer = AutoTokenizer.from_pretrained(model_name)model = AutoModelForCausalLM.from_pretrained(model_name)12 unmodified lines
demo = gr.Interface( fn=generate_text, inputs=gr.Textbox(label="Metin başlangıcı", placeholder="Bir cümle yaz..."), outputs=gr.Textbox(label="Üretilen Türkçe metin"), title="Türkçe Metin Üretici (DistilGPT2)", description="Hafif, hızlı, Türkçe bir metin üretme modeli." inputs=gr.Textbox(label="Metin başlangıcı"), outputs=gr.Textbox(label="Üretilen metin"), title="Türkçe Metin Üretici", description="GPT-2 tabanlı, Türkçe için eğitilmiş hızlı bir model.")
demo.launch()app.py+5-5