Spaces:
Sleeping
Sleeping
Aziz Alto
commited on
Commit
·
94de721
1
Parent(s):
6219213
Update gpt.py
Browse files
gpt.py
CHANGED
|
@@ -8,17 +8,11 @@ import openai
|
|
| 8 |
|
| 9 |
# st.set_page_config(layout="wide")
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
os.environ[
|
| 13 |
-
"ANTHROPIC_API_KEY"
|
| 14 |
-
] = "sk-ant-hoJDA77YMGZ5Rmxt9IYgzkavTj-VdnwXnJINAgUJCgUHtF9uIFLYaLoCFKGbA7Bupd606KVNaDmbYfTANCPygw"
|
| 15 |
-
|
| 16 |
-
# hackathon-nyc-5
|
| 17 |
-
os.environ["OPENAI_API_KEY"] = "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"
|
| 18 |
-
|
| 19 |
|
| 20 |
class AnthropicSerivce:
|
| 21 |
def __init__(self):
|
|
|
|
|
|
|
| 22 |
self.client = self.anthropic_client()
|
| 23 |
|
| 24 |
@staticmethod
|
|
|
|
| 8 |
|
| 9 |
# st.set_page_config(layout="wide")
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
class AnthropicSerivce:
|
| 13 |
def __init__(self):
|
| 14 |
+
if "ANTHROPIC_API_KEY" not in os.environ:
|
| 15 |
+
os.environ["ANTHROPIC_API_KEY"] = st.text_input("Anthropic API Key", type="password")
|
| 16 |
self.client = self.anthropic_client()
|
| 17 |
|
| 18 |
@staticmethod
|