Spaces:
Sleeping
Sleeping
Vaishnav14220 commited on
Commit ·
97e1204
1
Parent(s): 40820ca
Update HF token environment variable name to 'trial1'
Browse files
app.py
CHANGED
|
@@ -321,7 +321,7 @@ def update_database_with_ai_fix(password):
|
|
| 321 |
df.at[idx, 'description'] = last_ai_fix['updated_data'].get('description', df.at[idx, 'description'])
|
| 322 |
|
| 323 |
# Try to push to Hugging Face
|
| 324 |
-
hf_token = os.getenv('
|
| 325 |
if hf_token:
|
| 326 |
try:
|
| 327 |
# Convert back to Hugging Face dataset
|
|
@@ -343,7 +343,7 @@ def update_database_with_ai_fix(password):
|
|
| 343 |
push_error_msg = str(push_error)
|
| 344 |
else:
|
| 345 |
push_success = False
|
| 346 |
-
push_error_msg = "
|
| 347 |
|
| 348 |
# Log the update
|
| 349 |
log_entry = f"[{last_ai_fix['timestamp']}] Database updated: '{original_name}' -> '{df.at[idx, 'corrected_name']}' | HF Push: {'Success' if push_success else 'Failed: ' + push_error_msg}\n"
|
|
@@ -363,7 +363,7 @@ def update_database_with_ai_fix(password):
|
|
| 363 |
else:
|
| 364 |
success_msg += "The reaction has been updated in the current session.\n"
|
| 365 |
success_msg += f"**Note:** Could not push to Hugging Face: {push_error_msg}\n"
|
| 366 |
-
success_msg += "Please check that
|
| 367 |
|
| 368 |
success_msg += "Changes logged to 'database_updates.log'."
|
| 369 |
|
|
|
|
| 321 |
df.at[idx, 'description'] = last_ai_fix['updated_data'].get('description', df.at[idx, 'description'])
|
| 322 |
|
| 323 |
# Try to push to Hugging Face
|
| 324 |
+
hf_token = os.getenv('trial1')
|
| 325 |
if hf_token:
|
| 326 |
try:
|
| 327 |
# Convert back to Hugging Face dataset
|
|
|
|
| 343 |
push_error_msg = str(push_error)
|
| 344 |
else:
|
| 345 |
push_success = False
|
| 346 |
+
push_error_msg = "trial1 not found in environment variables"
|
| 347 |
|
| 348 |
# Log the update
|
| 349 |
log_entry = f"[{last_ai_fix['timestamp']}] Database updated: '{original_name}' -> '{df.at[idx, 'corrected_name']}' | HF Push: {'Success' if push_success else 'Failed: ' + push_error_msg}\n"
|
|
|
|
| 363 |
else:
|
| 364 |
success_msg += "The reaction has been updated in the current session.\n"
|
| 365 |
success_msg += f"**Note:** Could not push to Hugging Face: {push_error_msg}\n"
|
| 366 |
+
success_msg += "Please check that trial1 is set in space secrets.\n\n"
|
| 367 |
|
| 368 |
success_msg += "Changes logged to 'database_updates.log'."
|
| 369 |
|