Spaces:
Running
Running
Commit
·
dedb651
1
Parent(s):
e805b05
file upload gallery
Browse files
app.py
CHANGED
|
@@ -706,7 +706,7 @@ def save_prompt_yaml(filename, col_right_save):
|
|
| 706 |
yaml.safe_dump(yaml_content, file)
|
| 707 |
|
| 708 |
st.success(f"Prompt saved as '{filename}.yaml'.")
|
| 709 |
-
|
| 710 |
upload_to_drive(filepath, filename)
|
| 711 |
|
| 712 |
with col_right_save:
|
|
@@ -722,12 +722,14 @@ def upload_to_drive(filepath, filename):
|
|
| 722 |
service = build('drive', 'v3', credentials=creds)
|
| 723 |
|
| 724 |
# Get the folder ID from the environment variable
|
| 725 |
-
folder_id = os.environ.get('
|
|
|
|
| 726 |
|
| 727 |
file_metadata = {
|
| 728 |
'name': filename,
|
| 729 |
'parents': [folder_id]
|
| 730 |
}
|
|
|
|
| 731 |
|
| 732 |
media = MediaFileUpload(filepath, mimetype='application/x-yaml')
|
| 733 |
|
|
|
|
| 706 |
yaml.safe_dump(yaml_content, file)
|
| 707 |
|
| 708 |
st.success(f"Prompt saved as '{filename}.yaml'.")
|
| 709 |
+
|
| 710 |
upload_to_drive(filepath, filename)
|
| 711 |
|
| 712 |
with col_right_save:
|
|
|
|
| 722 |
service = build('drive', 'v3', credentials=creds)
|
| 723 |
|
| 724 |
# Get the folder ID from the environment variable
|
| 725 |
+
folder_id = os.environ.get('GDRIVE')
|
| 726 |
+
st.info(f"{folder_id}")
|
| 727 |
|
| 728 |
file_metadata = {
|
| 729 |
'name': filename,
|
| 730 |
'parents': [folder_id]
|
| 731 |
}
|
| 732 |
+
st.info(f"{file_metadata}")
|
| 733 |
|
| 734 |
media = MediaFileUpload(filepath, mimetype='application/x-yaml')
|
| 735 |
|