Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -205,7 +205,10 @@ def agent(prompt_in,history,mod=2,tok_in=""):
|
|
205 |
MAX_DATA=int(clients[int(mod)]['max_tokens'])*2
|
206 |
if not history:history=[{'role':'user','content':prompt_in['text']}]
|
207 |
while go == True:
|
|
|
|
|
208 |
try:
|
|
|
209 |
file_list = fs.ls(f'spaces/{user_}{repo_}',detail=False)
|
210 |
except Exception as e:
|
211 |
print(e)
|
|
|
205 |
MAX_DATA=int(clients[int(mod)]['max_tokens'])*2
|
206 |
if not history:history=[{'role':'user','content':prompt_in['text']}]
|
207 |
while go == True:
|
208 |
+
fs = HfFileSystem(token=access_token)
|
209 |
+
|
210 |
try:
|
211 |
+
#file_list = fs.ls(f'spaces/{user_}{repo_}',detail=False)
|
212 |
file_list = fs.ls(f'spaces/{user_}{repo_}',detail=False)
|
213 |
except Exception as e:
|
214 |
print(e)
|