Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from
|
| 2 |
from langchain import OpenAI
|
| 3 |
import gradio as gr
|
| 4 |
from gradio import Interface, Textbox
|
|
@@ -50,7 +50,7 @@ def store_message(chatinput: str, chatresponse: str):
|
|
| 50 |
file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
|
| 51 |
print(f"Wrote to datafile: {datetime.now()},{chatinput},{chatresponse}\n")
|
| 52 |
|
| 53 |
-
#trial - take out if fails
|
| 54 |
with open('backup.txt', "a") as file:
|
| 55 |
file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
|
| 56 |
print(f"Wrote to datafile: {datetime.now()},{chatinput},{chatresponse}\n")
|
|
|
|
| 1 |
+
from gpt_index import GPTSimpleVectorIndex
|
| 2 |
from langchain import OpenAI
|
| 3 |
import gradio as gr
|
| 4 |
from gradio import Interface, Textbox
|
|
|
|
| 50 |
file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
|
| 51 |
print(f"Wrote to datafile: {datetime.now()},{chatinput},{chatresponse}\n")
|
| 52 |
|
| 53 |
+
#trial - take out if fails to write to local directory
|
| 54 |
with open('backup.txt', "a") as file:
|
| 55 |
file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
|
| 56 |
print(f"Wrote to datafile: {datetime.now()},{chatinput},{chatresponse}\n")
|