baconnier commited on
Commit
b0edfa1
1 Parent(s): 67c562d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
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 = self.prompt_refiner.refine_prompt(input_data)
415
- analysis_evaluation = f"\n\n{result.initial_prompt_evaluation}"
 
 
416
  return (
417
  analysis_evaluation,
418
- result.refined_prompt,
419
- result.explanation_of_refinements,
420
- result.dict()
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):