Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -411,13 +411,15 @@ input[type="radio"]:checked::after {
|
|
| 411 |
|
| 412 |
def refine_prompt(self, prompt: str, meta_prompt_choice: str) -> tuple:
|
| 413 |
input_data = PromptInput(text=prompt, meta_prompt_choice=meta_prompt_choice)
|
| 414 |
-
result
|
| 415 |
-
|
|
|
|
|
|
|
| 416 |
return (
|
| 417 |
analysis_evaluation,
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
)
|
| 422 |
|
| 423 |
def apply_prompts(self, original_prompt: str, refined_prompt: str, model: str):
|
|
|
|
| 411 |
|
| 412 |
def refine_prompt(self, prompt: str, meta_prompt_choice: str) -> tuple:
|
| 413 |
input_data = PromptInput(text=prompt, meta_prompt_choice=meta_prompt_choice)
|
| 414 |
+
# Since result is a tuple with 4 elements based on the return value of prompt_refiner.refine_prompt
|
| 415 |
+
initial_prompt_evaluation, refined_prompt, explanation_refinements, full_response = self.prompt_refiner.refine_prompt(input_data)
|
| 416 |
+
|
| 417 |
+
analysis_evaluation = f"\n\n{initial_prompt_evaluation}"
|
| 418 |
return (
|
| 419 |
analysis_evaluation,
|
| 420 |
+
refined_prompt,
|
| 421 |
+
explanation_refinements,
|
| 422 |
+
full_response
|
| 423 |
)
|
| 424 |
|
| 425 |
def apply_prompts(self, original_prompt: str, refined_prompt: str, model: str):
|