Update app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,6 @@ from huggingface_hub import InferenceClient
|
|
| 3 |
from sentence_transformers import SentenceTransformer
|
| 4 |
import torch
|
| 5 |
|
| 6 |
-
chatbot = gr.ChatInterface(
|
| 7 |
-
respond,
|
| 8 |
-
type="messages",
|
| 9 |
-
examples=None,
|
| 10 |
-
title="Character Creator",
|
| 11 |
-
description="Welcome! Tell me what you want to create and we can make your character come to life!"
|
| 12 |
-
)
|
| 13 |
-
|
| 14 |
|
| 15 |
with open("knowledge.txt", "r", encoding="utf-8") as file:
|
| 16 |
knowledge = file.read()
|
|
@@ -86,4 +78,18 @@ def respond(message, history):
|
|
| 86 |
|
| 87 |
chatbot = gr.ChatInterface(respond, type="messages")
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
chatbot.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
from sentence_transformers import SentenceTransformer
|
| 4 |
import torch
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
with open("knowledge.txt", "r", encoding="utf-8") as file:
|
| 8 |
knowledge = file.read()
|
|
|
|
| 78 |
|
| 79 |
chatbot = gr.ChatInterface(respond, type="messages")
|
| 80 |
|
| 81 |
+
|
| 82 |
+
chatbot = gr.ChatInterface(
|
| 83 |
+
respond,
|
| 84 |
+
type="messages",
|
| 85 |
+
examples=None,
|
| 86 |
+
title="Character Creator",
|
| 87 |
+
description="Welcome! Tell me what you want to create and we can make your character come to life!"
|
| 88 |
+
)
|
| 89 |
+
|
| 90 |
+
|
| 91 |
chatbot.launch()
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
|