Spaces:
Running
Running
~sort prompt templates a-z
Browse files
app.py
CHANGED
@@ -21,6 +21,8 @@ def download_prompt_templates():
|
|
21 |
act = row[0].strip('"')
|
22 |
prompt = row[1].strip('"')
|
23 |
prompt_templates[act] = prompt
|
|
|
|
|
24 |
except requests.exceptions.RequestException as e:
|
25 |
print(f"An error occurred while downloading prompt templates: {e}")
|
26 |
return
|
@@ -81,6 +83,7 @@ def submit_message(user_token, prompt, prompt_template, temperature, max_tokens,
|
|
81 |
def clear_conversation():
|
82 |
return gr.update(value=None, visible=True), None, "", get_empty_state()
|
83 |
|
|
|
84 |
css = """
|
85 |
#col-container {max-width: 80%; margin-left: auto; margin-right: auto;}
|
86 |
#chatbox {min-height: 400px;}
|
|
|
21 |
act = row[0].strip('"')
|
22 |
prompt = row[1].strip('"')
|
23 |
prompt_templates[act] = prompt
|
24 |
+
|
25 |
+
prompt_templates = dict(sorted(prompt_templates.items(), key=lambda item: item[0]))
|
26 |
except requests.exceptions.RequestException as e:
|
27 |
print(f"An error occurred while downloading prompt templates: {e}")
|
28 |
return
|
|
|
83 |
def clear_conversation():
|
84 |
return gr.update(value=None, visible=True), None, "", get_empty_state()
|
85 |
|
86 |
+
|
87 |
css = """
|
88 |
#col-container {max-width: 80%; margin-left: auto; margin-right: auto;}
|
89 |
#chatbox {min-height: 400px;}
|