Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ class Chatbot:
|
|
54 |
repo_id="index",
|
55 |
repo_type="dataset",
|
56 |
folder_path=dataset_dir,
|
57 |
-
path_in_repo=
|
58 |
)
|
59 |
|
60 |
def generate_response(self, user_input):
|
@@ -99,6 +99,7 @@ class Chatbot:
|
|
99 |
with scheduler.lock:
|
100 |
with open(self.history_file, 'w') as f:
|
101 |
json.dump(self.chat_history, f)
|
|
|
102 |
|
103 |
def create_bot(user_input):
|
104 |
bot = Chatbot(os.getenv("OPENAI_API_KEY"), index=index)
|
|
|
54 |
repo_id="index",
|
55 |
repo_type="dataset",
|
56 |
folder_path=dataset_dir,
|
57 |
+
path_in_repo=dataset_dir.name,
|
58 |
)
|
59 |
|
60 |
def generate_response(self, user_input):
|
|
|
99 |
with scheduler.lock:
|
100 |
with open(self.history_file, 'w') as f:
|
101 |
json.dump(self.chat_history, f)
|
102 |
+
f.write("\n")
|
103 |
|
104 |
def create_bot(user_input):
|
105 |
bot = Chatbot(os.getenv("OPENAI_API_KEY"), index=index)
|