Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -656,9 +656,13 @@ def save_question_to_csv(file_path, question):
|
|
656 |
inputs = gr.inputs.Textbox(lines=1, label="Enter your Question:")
|
657 |
outputs = gr.outputs.Textbox(label="Answer:")
|
658 |
|
|
|
|
|
|
|
|
|
659 |
def run_app(input):
|
660 |
answer = run_chain(input)
|
661 |
-
save_question_to_csv(
|
662 |
return answer
|
663 |
|
664 |
-
gr.Interface(fn=run_app, inputs=inputs, outputs=outputs, title="The following is a conversation with a human called Shegardi. Shegardi is helpful, precise, truthful, and very friendly. Also, Shegardi is an employee of Warba Bank, located in Kuwait. Shegardi will only use the information provided to him.").launch()
|
|
|
656 |
inputs = gr.inputs.Textbox(lines=1, label="Enter your Question:")
|
657 |
outputs = gr.outputs.Textbox(label="Answer:")
|
658 |
|
659 |
+
|
660 |
+
# Provide an absolute path to the CSV file
|
661 |
+
csv_file_path = os.path.abspath('questions.csv')
|
662 |
+
|
663 |
def run_app(input):
|
664 |
answer = run_chain(input)
|
665 |
+
save_question_to_csv(csv_file_path, input)
|
666 |
return answer
|
667 |
|
668 |
+
gr.Interface(fn=run_app, inputs=inputs, outputs=outputs, title="The following is a conversation with a human called Shegardi. Shegardi is helpful, precise, truthful, and very friendly. Also, Shegardi is an employee of Warba Bank, located in Kuwait. Shegardi will only use the information provided to him.").launch()
|