Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
@@ -235,7 +235,7 @@ The description of the problem should not exceed 100 words or so."""
|
|
235 |
|
236 |
return prompt
|
237 |
|
238 |
-
def
|
239 |
# Check if Gemini library was imported and configured
|
240 |
if not genai:
|
241 |
logger.error("Gemini client is not available or configured.")
|
@@ -645,7 +645,7 @@ Try to be about the same length as the examples if possible."""
|
|
645 |
|
646 |
logger.info(f"Successfully generated descriptions: {successful_count}/{len(list_of_challenges)} ")
|
647 |
|
648 |
-
evaluated_problematics =
|
649 |
|
650 |
final_output = []
|
651 |
for i in range(len(generated_descriptions)):
|
|
|
235 |
|
236 |
return prompt
|
237 |
|
238 |
+
def generate_problematics_and_scores(descriptions: list[str]):
|
239 |
# Check if Gemini library was imported and configured
|
240 |
if not genai:
|
241 |
logger.error("Gemini client is not available or configured.")
|
|
|
645 |
|
646 |
logger.info(f"Successfully generated descriptions: {successful_count}/{len(list_of_challenges)} ")
|
647 |
|
648 |
+
evaluated_problematics = generate_problematics_and_scores(generated_descriptions)
|
649 |
|
650 |
final_output = []
|
651 |
for i in range(len(generated_descriptions)):
|