Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# INSTRUCTIONS for Chat Bot on line
|
| 2 |
|
| 3 |
# Imports
|
| 4 |
import gradio as gr
|
|
@@ -13,7 +13,13 @@ openai_key = os.getenv("OPENAI_KEY")
|
|
| 13 |
if not openai_key:
|
| 14 |
raise ValueError("OPENAI_KEY not set")
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
github_key = os.getenv("GITHUB_KEY")
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
client = OpenAI(api_key=openai_key)
|
| 19 |
|
|
|
|
| 1 |
+
# INSTRUCTIONS for Chat Bot on line 52, Repository name on line 30
|
| 2 |
|
| 3 |
# Imports
|
| 4 |
import gradio as gr
|
|
|
|
| 13 |
if not openai_key:
|
| 14 |
raise ValueError("OPENAI_KEY not set")
|
| 15 |
|
| 16 |
+
# Scrub hidden spaces from the OpenAI key
|
| 17 |
+
openai_key = openai_key.replace('\xa0', '').strip()
|
| 18 |
+
|
| 19 |
github_key = os.getenv("GITHUB_KEY")
|
| 20 |
+
# Scrub hidden spaces from the GitHub key if it exists
|
| 21 |
+
if github_key:
|
| 22 |
+
github_key = github_key.replace('\xa0', '').strip()
|
| 23 |
|
| 24 |
client = OpenAI(api_key=openai_key)
|
| 25 |
|