Spaces:
Runtime error
Runtime error
gaspar-avit
commited on
Commit
·
d71ffb1
1
Parent(s):
d4b66d6
Upload app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ from diffusers import DiffusionPipeline
|
|
19 |
# Environment variables
|
20 |
os.environ['KAGGLE_USERNAME'] = st.secrets['username']
|
21 |
os.environ['KAGGLE_KEY'] = st.secrets['key']
|
22 |
-
os.environ['KAGGLE_CONFIG_DIR'] = '/home/appuser/.kaggle/kaggle.json'
|
23 |
from kaggle.api.kaggle_api_extended import KaggleApi
|
24 |
|
25 |
|
@@ -93,12 +93,13 @@ def generate_poster(movie_data):
|
|
93 |
## --- CONNECT TO KAGGLE --- ##
|
94 |
###############################
|
95 |
|
|
|
96 |
# Authenticate Kaggle account
|
97 |
os.environ['KAGGLE_USERNAME'] = st.secrets['username']
|
98 |
os.environ['KAGGLE_KEY'] = st.secrets['key']
|
99 |
os.environ['KAGGLE_CONFIG_DIR'] = '/home/appuser/.kaggle/kaggle.json'
|
100 |
|
101 |
-
|
102 |
api_token = {"username":st.secrets['username'],"key":st.secrets['key']}
|
103 |
with open('/home/appuser/.kaggle/kaggle.json', 'w') as file:
|
104 |
json.dump(api_token, file)
|
|
|
19 |
# Environment variables
|
20 |
os.environ['KAGGLE_USERNAME'] = st.secrets['username']
|
21 |
os.environ['KAGGLE_KEY'] = st.secrets['key']
|
22 |
+
#os.environ['KAGGLE_CONFIG_DIR'] = '/home/appuser/.kaggle/kaggle.json'
|
23 |
from kaggle.api.kaggle_api_extended import KaggleApi
|
24 |
|
25 |
|
|
|
93 |
## --- CONNECT TO KAGGLE --- ##
|
94 |
###############################
|
95 |
|
96 |
+
'''
|
97 |
# Authenticate Kaggle account
|
98 |
os.environ['KAGGLE_USERNAME'] = st.secrets['username']
|
99 |
os.environ['KAGGLE_KEY'] = st.secrets['key']
|
100 |
os.environ['KAGGLE_CONFIG_DIR'] = '/home/appuser/.kaggle/kaggle.json'
|
101 |
|
102 |
+
|
103 |
api_token = {"username":st.secrets['username'],"key":st.secrets['key']}
|
104 |
with open('/home/appuser/.kaggle/kaggle.json', 'w') as file:
|
105 |
json.dump(api_token, file)
|