Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -95,10 +95,9 @@ def generate_prompt(image, api_key, style, creativity, neg_prompt, aspect, color
|
|
| 95 |
input_tokens = len(img_b64) // 4 # Approximate
|
| 96 |
output_tokens = len(raw_prompt.split())
|
| 97 |
|
| 98 |
-
return {
|
| 99 |
-
"
|
| 100 |
-
"
|
| 101 |
-
"stats": {"input": input_tokens, "output": output_tokens}
|
| 102 |
}
|
| 103 |
|
| 104 |
except Exception as e:
|
|
|
|
| 95 |
input_tokens = len(img_b64) // 4 # Approximate
|
| 96 |
output_tokens = len(raw_prompt.split())
|
| 97 |
|
| 98 |
+
return raw_prompt, validation, {
|
| 99 |
+
"input": input_tokens,
|
| 100 |
+
"output": output_tokens
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
except Exception as e:
|