Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,8 +19,8 @@ from langchain import OpenAI
|
|
| 19 |
|
| 20 |
# documents = SimpleDirectoryReader('GoChat/GoChat247Demo/Data').load_data()
|
| 21 |
from datasets import load_dataset
|
| 22 |
-
doc = load_dataset("text", data_dir="https://huggingface.co/datasets/
|
| 23 |
-
|
| 24 |
# Setup your LLM
|
| 25 |
|
| 26 |
|
|
@@ -87,7 +87,8 @@ class Chatbot:
|
|
| 87 |
self.chat_history.append(message)
|
| 88 |
return message
|
| 89 |
|
| 90 |
-
def
|
|
|
|
| 91 |
try:
|
| 92 |
with open(filename, 'r') as f:
|
| 93 |
self.chat_history = json.load(f)
|
|
@@ -133,4 +134,5 @@ with gr.Blocks() as demo:
|
|
| 133 |
|
| 134 |
|
| 135 |
if __name__ == "__main__":
|
| 136 |
-
demo.launch()
|
|
|
|
|
|
| 19 |
|
| 20 |
# documents = SimpleDirectoryReader('GoChat/GoChat247Demo/Data').load_data()
|
| 21 |
from datasets import load_dataset
|
| 22 |
+
doc = load_dataset("text", data_dir="https://huggingface.co/datasets/GoChat/Gochat247_Data")
|
| 23 |
+
|
| 24 |
# Setup your LLM
|
| 25 |
|
| 26 |
|
|
|
|
| 87 |
self.chat_history.append(message)
|
| 88 |
return message
|
| 89 |
|
| 90 |
+
def
|
| 91 |
+
load_chat_history(self, filename):
|
| 92 |
try:
|
| 93 |
with open(filename, 'r') as f:
|
| 94 |
self.chat_history = json.load(f)
|
|
|
|
| 134 |
|
| 135 |
|
| 136 |
if __name__ == "__main__":
|
| 137 |
+
# demo.launch()
|
| 138 |
+
print(doc)
|