Inan Ince
commited on
Commit
•
942ac8f
1
Parent(s):
6aad1e2
Add application file8
Browse files
app.py
CHANGED
@@ -1,15 +1,3 @@
|
|
1 |
-
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
-
|
5 |
-
chatbot_model = pipeline(model="facebook/blenderbot-400M-distill")
|
6 |
-
|
7 |
-
# Gradio için fonksiyon
|
8 |
-
def vanilla_chatbot(message, history):
|
9 |
-
# Girdi mesajını modele gönder ve cevabı al
|
10 |
-
response = chatbot_model(message)
|
11 |
-
return response["generated_text"] # Yanıtı döndür
|
12 |
-
|
13 |
-
# Gradio arayüzünü başlat
|
14 |
-
demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Vanilla Chatbot", description="Enter text to start chatting.")
|
15 |
-
demo_chatbot.launch()
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
gr.load("models/facebook/blenderbot-400M-distill").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|