Spaces:
Runtime error
Runtime error
Commit ·
b80ac7f
1
Parent(s): 0d7e2a6
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
#!/usr/bin/env python
|
| 2 |
# coding: utf-8
|
| 3 |
import os
|
| 4 |
-
os.environ["pyg_secret"]
|
|
|
|
|
|
|
| 5 |
# ## Import Libs
|
| 6 |
|
| 7 |
# In[54]:
|
|
@@ -26,8 +28,7 @@ print('Title example:',title[rand:rand+1].values[0])
|
|
| 26 |
print('Token example:',word_tokenize(title[rand:rand+1].values[0],engine='longest'))
|
| 27 |
|
| 28 |
# In[234]:
|
| 29 |
-
|
| 30 |
-
gc = pygsheets.authorize(os.environ["pyg_secret"])
|
| 31 |
|
| 32 |
def pygsheets_df(df,tab_name='huggingface-test',sheet_name = 'Subcategory Prediction'):
|
| 33 |
try:
|
|
|
|
| 1 |
#!/usr/bin/env python
|
| 2 |
# coding: utf-8
|
| 3 |
import os
|
| 4 |
+
print(os.environ["pyg_secret"])
|
| 5 |
+
import pygsheets
|
| 6 |
+
gc = pygsheets.authorize(os.environ["pyg_secret"].get('client_secret')
|
| 7 |
# ## Import Libs
|
| 8 |
|
| 9 |
# In[54]:
|
|
|
|
| 28 |
print('Token example:',word_tokenize(title[rand:rand+1].values[0],engine='longest'))
|
| 29 |
|
| 30 |
# In[234]:
|
| 31 |
+
|
|
|
|
| 32 |
|
| 33 |
def pygsheets_df(df,tab_name='huggingface-test',sheet_name = 'Subcategory Prediction'):
|
| 34 |
try:
|