Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -110,7 +110,7 @@ with gr.Blocks() as demo:
|
|
| 110 |
|
| 111 |
def checkapiinput(apikey):
|
| 112 |
if apikey != "" and apikey is not None and len(apikey) >=25 and len(apikey) <= 130:
|
| 113 |
-
openai.api_key = apikey
|
| 114 |
return gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True)
|
| 115 |
else:
|
| 116 |
return gr.update(visible=False), gr.update(visible=True), gr.update(value="", placeholder="Use a valid API key"), gr.update(visible=False)
|
|
|
|
| 110 |
|
| 111 |
def checkapiinput(apikey):
|
| 112 |
if apikey != "" and apikey is not None and len(apikey) >=25 and len(apikey) <= 130:
|
| 113 |
+
openai.api_key = apikey
|
| 114 |
return gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True)
|
| 115 |
else:
|
| 116 |
return gr.update(visible=False), gr.update(visible=True), gr.update(value="", placeholder="Use a valid API key"), gr.update(visible=False)
|