Update app.py
Browse files123456712 unmodified lines20212223242526272829import gradio as grfrom transformers import AutoTokenizer, AutoModelForCausalLMmodel_name = "burhanmt/destilgpt2-turkish" # Türkçe hızlı modeltokenizer = AutoTokenizer.from_pretrained(model_name)model = AutoModelForCausalLM.from_pretrained(model_name)12 unmodified linesdemo = 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.")demo.launch()123456712 unmodified lines20212223242526272829import gradio as grfrom transformers import AutoTokenizer, AutoModelForCausalLMmodel_name = "akoksal/turkish-gpt2-small" # ÇALIŞAN TÜRKÇE MODELtokenizer = AutoTokenizer.from_pretrained(model_name)model = AutoModelForCausalLM.from_pretrained(model_name)12 unmodified linesdemo = gr.Interface(fn=generate_text,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