Update app.py
Browse files
app.py
CHANGED
|
@@ -23,17 +23,17 @@ async def advancedPromptPipeline(InputPrompt, model="gpt-4o-mini", temperature=0
|
|
| 23 |
elapsed_time = time.time() - start_time
|
| 24 |
|
| 25 |
|
| 26 |
-
return {
|
| 27 |
-
|
| 28 |
"elapsed_time": elapsed_time,
|
| 29 |
-
|
| 30 |
-
|
| 31 |
"approximate_cost": (enhancer.prompt_tokens*i_cost)+(enhancer.completion_tokens*o_cost),
|
| 32 |
-
|
| 33 |
"advanced_prompt": advanced_prompt["advanced_prompt"],
|
| 34 |
-
}
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
|
| 39 |
demo = gr.Interface(fn=advancedPromptPipeline,
|
|
@@ -47,7 +47,7 @@ demo = gr.Interface(fn=advancedPromptPipeline,
|
|
| 47 |
],
|
| 48 |
title="Advanced Prompt Generator",
|
| 49 |
description="This tool will enhance any given input for the optimal output!",
|
| 50 |
-
theme="
|
| 51 |
)
|
| 52 |
|
| 53 |
|
|
|
|
| 23 |
elapsed_time = time.time() - start_time
|
| 24 |
|
| 25 |
|
| 26 |
+
"""return {
|
| 27 |
+
"model": model,
|
| 28 |
"elapsed_time": elapsed_time,
|
| 29 |
+
"prompt_tokens": enhancer.prompt_tokens,
|
| 30 |
+
"completion_tokens": enhancer.completion_tokens,
|
| 31 |
"approximate_cost": (enhancer.prompt_tokens*i_cost)+(enhancer.completion_tokens*o_cost),
|
| 32 |
+
"inout_prompt": input_prompt,
|
| 33 |
"advanced_prompt": advanced_prompt["advanced_prompt"],
|
| 34 |
+
}"""
|
| 35 |
|
| 36 |
+
return advanced_prompt["advanced_prompt"]
|
| 37 |
|
| 38 |
|
| 39 |
demo = gr.Interface(fn=advancedPromptPipeline,
|
|
|
|
| 47 |
],
|
| 48 |
title="Advanced Prompt Generator",
|
| 49 |
description="This tool will enhance any given input for the optimal output!",
|
| 50 |
+
theme="Glass"
|
| 51 |
)
|
| 52 |
|
| 53 |
|