Spaces:
Sleeping
Sleeping
innawy commited on
Commit ·
4f78d4a
1
Parent(s): d45cb48
update db
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ DB_NAME = "postgres"
|
|
| 31 |
openai.api_key = os.environ["OPENAI_API_KEY"]
|
| 32 |
# openai.api_key = os.getenv("OPENAI_API_KEY")
|
| 33 |
|
| 34 |
-
TABLE_NAME = "
|
| 35 |
|
| 36 |
css = """
|
| 37 |
|
|
@@ -893,8 +893,8 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="purple", secondary_hue="purple"
|
|
| 893 |
send_message_button = gr.Button("Click here to send message.")
|
| 894 |
|
| 895 |
with gr.Column(visible=False) as refresh:
|
| 896 |
-
output = gr.Markdown('<br/><br/> <span id="emp">You have done 10 turns of conversation! Please click the button below to
|
| 897 |
-
refresh_button = gr.
|
| 898 |
|
| 899 |
# send_message_button.click(fn=predict, inputs=[user_id_text, strategy_selection, text, chat_history, system_prompt1_convo2, situation1_convo2], outputs=[display, chat_history, text, output, refresh, message_error_message]) # TODO: after hitting 'Send Message', strategy selection and Feedback markdown should be refreshed / reset
|
| 900 |
send_message_button.click(fn=predict_and_check_edit, inputs=[mturk_id, strategy_selection, text, edited_text, chat_history, system_prompt1_convo2, convo_num2, skill_suggestion0, skill_suggestion1, skill_suggestion_reason, feedback_text, feedback_check, display], outputs=[display, chat_history, text, output, refresh, message_error_message, skill_suggestion0, skill_suggestion1, skill_suggestion_reason, feedback_text, edited_text, strategy_selection, feedback_check])
|
|
|
|
| 31 |
openai.api_key = os.environ["OPENAI_API_KEY"]
|
| 32 |
# openai.api_key = os.getenv("OPENAI_API_KEY")
|
| 33 |
|
| 34 |
+
TABLE_NAME = "user_study_t" #TODO: change this table name
|
| 35 |
|
| 36 |
css = """
|
| 37 |
|
|
|
|
| 893 |
send_message_button = gr.Button("Click here to send message.")
|
| 894 |
|
| 895 |
with gr.Column(visible=False) as refresh:
|
| 896 |
+
output = gr.Markdown('<br/><br/> <span id="emp">You have done 10 turns of conversation! Please click the button below to continue to the next step. </span>')
|
| 897 |
+
refresh_button = gr.Button("Continue to the next step")
|
| 898 |
|
| 899 |
# send_message_button.click(fn=predict, inputs=[user_id_text, strategy_selection, text, chat_history, system_prompt1_convo2, situation1_convo2], outputs=[display, chat_history, text, output, refresh, message_error_message]) # TODO: after hitting 'Send Message', strategy selection and Feedback markdown should be refreshed / reset
|
| 900 |
send_message_button.click(fn=predict_and_check_edit, inputs=[mturk_id, strategy_selection, text, edited_text, chat_history, system_prompt1_convo2, convo_num2, skill_suggestion0, skill_suggestion1, skill_suggestion_reason, feedback_text, feedback_check, display], outputs=[display, chat_history, text, output, refresh, message_error_message, skill_suggestion0, skill_suggestion1, skill_suggestion_reason, feedback_text, edited_text, strategy_selection, feedback_check])
|