Spaces:
Runtime error
Runtime error
louis030195
commited on
Commit
β’
1b7d097
1
Parent(s):
e5d3ffe
π
Browse files
app.py
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
import typing
|
2 |
import streamlit as st
|
3 |
-
|
|
|
|
|
|
|
4 |
|
5 |
dotenv.load_dotenv()
|
6 |
import openai
|
@@ -10,8 +13,6 @@ from urllib.parse import quote
|
|
10 |
import requests
|
11 |
from tenacity import retry
|
12 |
from tenacity.wait import wait_exponential
|
13 |
-
from tenacity.before import before_log
|
14 |
-
from tenacity.after import after_log
|
15 |
from tenacity.stop import stop_after_attempt
|
16 |
|
17 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
@@ -116,17 +117,14 @@ st.markdown(
|
|
116 |
)
|
117 |
|
118 |
|
119 |
-
# add a reference to the source code at https://github.com/louis030195/paul-graham-clone
|
120 |
st.markdown(
|
121 |
"""
|
122 |
-
[Source code](https://
|
123 |
"""
|
124 |
)
|
125 |
|
126 |
-
# reference to gpt-index
|
127 |
st.markdown(
|
128 |
"""
|
129 |
-
Built with β€οΈ by [louis030195](https://louis030195.com)
|
130 |
-
ndex) library
|
131 |
"""
|
132 |
)
|
|
|
1 |
import typing
|
2 |
import streamlit as st
|
3 |
+
try:
|
4 |
+
import dotenv
|
5 |
+
except ImportError:
|
6 |
+
pass
|
7 |
|
8 |
dotenv.load_dotenv()
|
9 |
import openai
|
|
|
13 |
import requests
|
14 |
from tenacity import retry
|
15 |
from tenacity.wait import wait_exponential
|
|
|
|
|
16 |
from tenacity.stop import stop_after_attempt
|
17 |
|
18 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
|
|
117 |
)
|
118 |
|
119 |
|
|
|
120 |
st.markdown(
|
121 |
"""
|
122 |
+
[Source code](https://huggingface.co/spaces/louis030195/lsd-pt)
|
123 |
"""
|
124 |
)
|
125 |
|
|
|
126 |
st.markdown(
|
127 |
"""
|
128 |
+
Built with β€οΈ by [louis030195](https://louis030195.com).
|
|
|
129 |
"""
|
130 |
)
|