comment certain stuff
Browse files
app.py
CHANGED
|
@@ -340,30 +340,31 @@ def generate_code_with_devstral(plan_text, history, file_cache):
|
|
| 340 |
)
|
| 341 |
|
| 342 |
# Use Modal app.run() pattern like in the examples
|
| 343 |
-
|
| 344 |
-
api_key = "ak-zMwhIPjqvBj30jbm1DmKqx"
|
| 345 |
|
| 346 |
print(f"π Generating code using Devstral...")
|
| 347 |
print(f"π‘ Connecting to: {base_url}")
|
|
|
|
|
|
|
| 348 |
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
|
| 365 |
-
except Exception as e:
|
| 366 |
-
|
| 367 |
|
| 368 |
# Custom CSS for a sleek design
|
| 369 |
custom_css = """
|
|
|
|
| 340 |
)
|
| 341 |
|
| 342 |
# Use Modal app.run() pattern like in the examples
|
| 343 |
+
|
|
|
|
| 344 |
|
| 345 |
print(f"π Generating code using Devstral...")
|
| 346 |
print(f"π‘ Connecting to: {base_url}")
|
| 347 |
+
|
| 348 |
+
return ""
|
| 349 |
|
| 350 |
+
# # Call Modal inference using the proper app.run() context
|
| 351 |
+
# with devstral_app.run():
|
| 352 |
+
# result = run_devstral_inference.remote(
|
| 353 |
+
# base_url=base_url,
|
| 354 |
+
# api_key=api_key,
|
| 355 |
+
# prompts=[formatted_user_prompt],
|
| 356 |
+
# system_prompt=devstral_code_gen_sys_prompt,
|
| 357 |
+
# mode="single"
|
| 358 |
+
# )
|
| 359 |
|
| 360 |
+
# if result and "response" in result:
|
| 361 |
+
# code_output = result["response"]
|
| 362 |
+
# return f"π **Generated Code:**\n\n{code_output}"
|
| 363 |
+
# else:
|
| 364 |
+
# return "β **Error:** No response received from Devstral model."
|
| 365 |
|
| 366 |
+
# except Exception as e:
|
| 367 |
+
# return f"β **Error:** {str(e)}"
|
| 368 |
|
| 369 |
# Custom CSS for a sleek design
|
| 370 |
custom_css = """
|