Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -107,6 +107,8 @@ class GradioInterface:
|
|
107 |
|
108 |
with gr.Row():
|
109 |
prompt_text = gr.Textbox(label="Type the prompt here")
|
|
|
|
|
110 |
with gr.Row():
|
111 |
meta_prompt_choice = gr.Radio(["star","done","physics","morphosis", "verse", "phor","bolism"], label="Choose Meta Prompt", value="star")
|
112 |
refine_button = gr.Button("Refine Prompt")
|
@@ -193,15 +195,17 @@ class GradioInterface:
|
|
193 |
self.interface.launch(share=share)
|
194 |
|
195 |
metaprompt_explanations = {
|
196 |
-
"star": "
|
197 |
-
"done": "
|
198 |
-
"physics": "
|
199 |
-
"morphosis": "
|
200 |
-
"verse": "
|
201 |
-
"phor": "
|
202 |
-
"bolism": "
|
203 |
}
|
204 |
|
|
|
|
|
205 |
# Main code to run the application
|
206 |
if __name__ == '__main__':
|
207 |
meta_info=""
|
|
|
107 |
|
108 |
with gr.Row():
|
109 |
prompt_text = gr.Textbox(label="Type the prompt here")
|
110 |
+
with gr.Accordion("Meta Prompt explanation", open=False):
|
111 |
+
gr.Markdown(explanation_markdown)
|
112 |
with gr.Row():
|
113 |
meta_prompt_choice = gr.Radio(["star","done","physics","morphosis", "verse", "phor","bolism"], label="Choose Meta Prompt", value="star")
|
114 |
refine_button = gr.Button("Refine Prompt")
|
|
|
195 |
self.interface.launch(share=share)
|
196 |
|
197 |
metaprompt_explanations = {
|
198 |
+
"star": "Use ECHO when you need a comprehensive, multi-stage approach for complex prompts. It's ideal for tasks requiring in-depth analysis, exploration of multiple alternatives, and synthesis of ideas. Choose this over others when you have time for a thorough refinement process and need to consider various aspects of the prompt.",
|
199 |
+
"done": "Opt for this when you want a structured approach with emphasis on role-playing and advanced techniques. It's particularly useful for tasks that benefit from diverse perspectives and complex reasoning. Prefer this over 'physics' when you need a more detailed, step-by-step refinement process.",
|
200 |
+
"physics": "Select this when you need a balance between structure and advanced techniques, with a focus on role-playing. It's similar to 'done' but may be more suitable for scientific or technical prompts. Choose this over 'done' for a slightly less complex approach.",
|
201 |
+
"morphosis": "Use this simplified approach for straightforward prompts or when time is limited. It focuses on essential improvements without complex techniques. Prefer this over other methods when you need quick, clear refinements without extensive analysis.",
|
202 |
+
"verse": "Choose this method when you need to analyze and improve a prompt's strengths and weaknesses, with a focus on information flow. It's particularly useful for enhancing the logical structure of prompts. Use this over 'morphosis' when you need more depth but less complexity than 'star'.",
|
203 |
+
"phor": "Employ this advanced approach when you need to combine multiple prompt engineering techniques. It's ideal for complex tasks requiring both clarity and sophisticated prompting methods. Select this over 'star' when you want a more flexible, technique-focused approach.",
|
204 |
+
"bolism": "Utilize this method when working with autoregressive language models and when the task requires careful reasoning before conclusions. It's best for prompts that need detailed output formatting. Choose this over others when the prompt's structure and reasoning order are crucial."
|
205 |
}
|
206 |
|
207 |
+
explanation_markdown = "".join([f"- **{key}**: {value}\n" for key, value in metaprompt_explanations.items()])
|
208 |
+
|
209 |
# Main code to run the application
|
210 |
if __name__ == '__main__':
|
211 |
meta_info=""
|