Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
# Türkçe
|
| 5 |
-
chatbot = pipeline("text-generation", model="
|
| 6 |
|
| 7 |
# Chatbot fonksiyonu
|
| 8 |
def chat(user_input):
|
| 9 |
response = chatbot(user_input, max_length=200, do_sample=True)[0]['generated_text']
|
| 10 |
return response
|
| 11 |
|
| 12 |
-
# Gradio
|
| 13 |
iface = gr.Interface(fn=chat, inputs="text", outputs="text", title="Tanımatik AI")
|
| 14 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
# Türkçe doğal dil işleme modeli yükle
|
| 5 |
+
chatbot = pipeline("text-generation", model="dbmdz/bert-base-turkish-uncased")
|
| 6 |
|
| 7 |
# Chatbot fonksiyonu
|
| 8 |
def chat(user_input):
|
| 9 |
response = chatbot(user_input, max_length=200, do_sample=True)[0]['generated_text']
|
| 10 |
return response
|
| 11 |
|
| 12 |
+
# Gradio arayüzü
|
| 13 |
iface = gr.Interface(fn=chat, inputs="text", outputs="text", title="Tanımatik AI")
|
| 14 |
iface.launch()
|