Spaces:
Sleeping
Sleeping
acecalisto3
commited on
Commit
•
54cb025
1
Parent(s):
3104a5d
Update app.py
Browse files
app.py
CHANGED
@@ -56,12 +56,12 @@ def get_custom_response():
|
|
56 |
return gr.Textbox(label="Custom Response", placeholder="Press 'Enter' to Submit.", interactive=False)
|
57 |
|
58 |
def get_progress():
|
59 |
-
return gr.Progress(
|
60 |
|
61 |
def get_generated_files():
|
62 |
return gr.HTML(lambda: f"Generated Files<pre><code style='overflow-x: auto'>{utils.format_directory(OUTPUT_DIR)}</pre></code>", every=3, elem_id="files")
|
63 |
|
64 |
-
def get_download_btn():
|
65 |
return gr.Button("Download All Files")
|
66 |
|
67 |
def start(huggingface_key, ai_name, ai_role, top_5_goals):
|
@@ -89,7 +89,7 @@ def send_message(count, chat, api, message="Y"):
|
|
89 |
for i in range(count):
|
90 |
chat.append([message, None])
|
91 |
yield chat, count - i
|
92 |
-
api.send_message
|
93 |
for updated_chat in bot_response(chat, api):
|
94 |
yield updated_chat, count - i
|
95 |
|
@@ -168,7 +168,7 @@ with gr.Blocks(css=CSS) as app:
|
|
168 |
deactivate_inputs, None, [yes_btn, consecutive_yes, custom_response]
|
169 |
).then(
|
170 |
send_message,
|
171 |
-
[
|
172 |
[chatbot, consecutive_yes],
|
173 |
).then(
|
174 |
activate_inputs, None, [yes_btn, consecutive_yes, custom_response]
|
|
|
56 |
return gr.Textbox(label="Custom Response", placeholder="Press 'Enter' to Submit.", interactive=False)
|
57 |
|
58 |
def get_progress():
|
59 |
+
return gr.Progress() # Corrected to remove the label argument
|
60 |
|
61 |
def get_generated_files():
|
62 |
return gr.HTML(lambda: f"Generated Files<pre><code style='overflow-x: auto'>{utils.format_directory(OUTPUT_DIR)}</pre></code>", every=3, elem_id="files")
|
63 |
|
64 |
+
def get_download_btn():
|
65 |
return gr.Button("Download All Files")
|
66 |
|
67 |
def start(huggingface_key, ai_name, ai_role, top_5_goals):
|
|
|
89 |
for i in range(count):
|
90 |
chat.append([message, None])
|
91 |
yield chat, count - i
|
92 |
+
api.send_message(message)
|
93 |
for updated_chat in bot_response(chat, api):
|
94 |
yield updated_chat, count - i
|
95 |
|
|
|
168 |
deactivate_inputs, None, [yes_btn, consecutive_yes, custom_response]
|
169 |
).then(
|
170 |
send_message,
|
171 |
+
[con secutive_yes, chat_history, api, custom_response],
|
172 |
[chatbot, consecutive_yes],
|
173 |
).then(
|
174 |
activate_inputs, None, [yes_btn, consecutive_yes, custom_response]
|