Spaces:
Sleeping
Sleeping
add exception type
Browse files
app.py
CHANGED
@@ -27,8 +27,8 @@ with gr.Blocks(title = "LLM Code injection", ) as demo:
|
|
27 |
api_key_input = gr.Textbox(lines = 1, label = "OpenAI API Key", placeholder = "Enter your OpenAI API key", autofocus=True)
|
28 |
try:
|
29 |
os.environ["OPENAI_API_KEY"] = api_key_input.value
|
30 |
-
except
|
31 |
-
Exception(
|
32 |
|
33 |
# Add a noninteractive image
|
34 |
#gr.Image(image_path, interactive=False, label="Demonstration Image")
|
|
|
27 |
api_key_input = gr.Textbox(lines = 1, label = "OpenAI API Key", placeholder = "Enter your OpenAI API key", autofocus=True)
|
28 |
try:
|
29 |
os.environ["OPENAI_API_KEY"] = api_key_input.value
|
30 |
+
except Exception as e:
|
31 |
+
Exception(e)
|
32 |
|
33 |
# Add a noninteractive image
|
34 |
#gr.Image(image_path, interactive=False, label="Demonstration Image")
|