Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -302,13 +302,13 @@ class GradioInterface:
|
|
| 302 |
full_response
|
| 303 |
)
|
| 304 |
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
|
| 313 |
def launch(self, share=False):
|
| 314 |
self.interface.launch(share=share)
|
|
|
|
| 302 |
full_response
|
| 303 |
)
|
| 304 |
|
| 305 |
+
def apply_prompts(self, original_prompt: str, refined_prompt: str, model: str):
|
| 306 |
+
try:
|
| 307 |
+
original_output = self.prompt_refiner.apply_prompt(original_prompt, model)
|
| 308 |
+
refined_output = self.prompt_refiner.apply_prompt(refined_prompt, model)
|
| 309 |
+
return original_output, refined_output
|
| 310 |
+
except Exception as e:
|
| 311 |
+
return f"Error: {str(e)}", f"Error: {str(e)}"
|
| 312 |
|
| 313 |
def launch(self, share=False):
|
| 314 |
self.interface.launch(share=share)
|