Spaces:
Running
Running
Use configured Ark model in HTML generation
Browse files
screencoder/html_generator.py
CHANGED
|
@@ -306,8 +306,8 @@ def main():
|
|
| 306 |
print(f"Error: API key not found in environment variable 'API_key'")
|
| 307 |
exit(1)
|
| 308 |
|
| 309 |
-
#
|
| 310 |
-
bot = Doubao(api_key
|
| 311 |
code_dict = generate_code_parallel(root, img_path, bot, user_instruction)
|
| 312 |
code_substitution(output_html_path, code_dict)
|
| 313 |
|
|
@@ -315,4 +315,4 @@ def main():
|
|
| 315 |
print(f"--- HTML Generation Complete for run_id: {args.run_id} ---")
|
| 316 |
|
| 317 |
if __name__ == "__main__":
|
| 318 |
-
main()
|
|
|
|
| 306 |
print(f"Error: API key not found in environment variable 'API_key'")
|
| 307 |
exit(1)
|
| 308 |
|
| 309 |
+
# Model id is resolved by Doubao from ARK_MODEL_ID, with a safe default fallback.
|
| 310 |
+
bot = Doubao(api_key)
|
| 311 |
code_dict = generate_code_parallel(root, img_path, bot, user_instruction)
|
| 312 |
code_substitution(output_html_path, code_dict)
|
| 313 |
|
|
|
|
| 315 |
print(f"--- HTML Generation Complete for run_id: {args.run_id} ---")
|
| 316 |
|
| 317 |
if __name__ == "__main__":
|
| 318 |
+
main()
|