Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -266,25 +266,26 @@ input[type="radio"]:checked::after {
|
|
266 |
refine_button = gr.Button("Refine Prompt")
|
267 |
|
268 |
# Option 1: Put Examples here (before Meta Prompt explanation)
|
269 |
-
with gr.
|
270 |
-
gr.Examples
|
271 |
-
|
272 |
-
[
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
|
|
285 |
|
286 |
-
|
287 |
-
|
288 |
|
289 |
|
290 |
|
@@ -348,23 +349,7 @@ input[type="radio"]:checked::after {
|
|
348 |
inputs=[prompt_text, refined_prompt, apply_model],
|
349 |
outputs=[original_output, refined_output]
|
350 |
)
|
351 |
-
|
352 |
-
with gr.Accordion("Examples", open=False):
|
353 |
-
gr.Examples(
|
354 |
-
examples=[
|
355 |
-
["Write a story on the end of prompt engineering replaced by an Ai specialized in refining prompts.", "star"],
|
356 |
-
["Tell me about that guy who invented the light bulb", "physics"],
|
357 |
-
["Explain the universe.", "star"],
|
358 |
-
["What's the population of New York City and how tall is the Empire State Building and who was the first mayor?", "morphosis"],
|
359 |
-
["List American presidents.", "verse"],
|
360 |
-
["Explain why the experiment failed.", "morphosis"],
|
361 |
-
["Is nuclear energy good?", "verse"],
|
362 |
-
["How does a computer work?", "phor"],
|
363 |
-
["How to make money fast?", "done"],
|
364 |
-
["how can you prove IT0's lemma in stochastic calculus ?", "arpe"],
|
365 |
-
],
|
366 |
-
inputs=[prompt_text, meta_prompt_choice]
|
367 |
-
)
|
368 |
def refine_prompt(self, prompt: str, meta_prompt_choice: str) -> tuple:
|
369 |
input_data = PromptInput(text=prompt, meta_prompt_choice=meta_prompt_choice)
|
370 |
result = self.prompt_refiner.refine_prompt(input_data)
|
|
|
266 |
refine_button = gr.Button("Refine Prompt")
|
267 |
|
268 |
# Option 1: Put Examples here (before Meta Prompt explanation)
|
269 |
+
with gr.Column(elem_classes=["container", "examples-container"]):
|
270 |
+
with gr.Accordion("Examples", open=False):
|
271 |
+
gr.Examples(
|
272 |
+
examples=[
|
273 |
+
["Write a story on the end of prompt engineering replaced by an Ai specialized in refining prompts.", "star"],
|
274 |
+
["Tell me about that guy who invented the light bulb", "physics"],
|
275 |
+
["Explain the universe.", "star"],
|
276 |
+
["What's the population of New York City and how tall is the Empire State Building and who was the first mayor?", "morphosis"],
|
277 |
+
["List American presidents.", "verse"],
|
278 |
+
["Explain why the experiment failed.", "morphosis"],
|
279 |
+
["Is nuclear energy good?", "verse"],
|
280 |
+
["How does a computer work?", "phor"],
|
281 |
+
["How to make money fast?", "done"],
|
282 |
+
["how can you prove IT0's lemma in stochastic calculus ?", "arpe"],
|
283 |
+
],
|
284 |
+
inputs=[prompt_text, meta_prompt_choice]
|
285 |
+
)
|
286 |
|
287 |
+
with gr.Accordion("Meta Prompt explanation", open=False):
|
288 |
+
gr.Markdown(explanation_markdown)
|
289 |
|
290 |
|
291 |
|
|
|
349 |
inputs=[prompt_text, refined_prompt, apply_model],
|
350 |
outputs=[original_output, refined_output]
|
351 |
)
|
352 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
def refine_prompt(self, prompt: str, meta_prompt_choice: str) -> tuple:
|
354 |
input_data = PromptInput(text=prompt, meta_prompt_choice=meta_prompt_choice)
|
355 |
result = self.prompt_refiner.refine_prompt(input_data)
|