Spaces:
Running
Running
Update rag_engine.py
Browse files- rag_engine.py +2 -2
rag_engine.py
CHANGED
@@ -92,7 +92,7 @@ def load_model():
|
|
92 |
return None, None
|
93 |
|
94 |
@st.cache_data(ttl=3600)
|
95 |
-
def download_file_from_gcs(
|
96 |
"""Download a file from GCS to local storage."""
|
97 |
try:
|
98 |
# Check if file already exists
|
@@ -100,7 +100,7 @@ def download_file_from_gcs(bucket, gcs_path, local_path):
|
|
100 |
print(f"File already exists locally: {local_path}")
|
101 |
return True
|
102 |
|
103 |
-
blob =
|
104 |
blob.download_to_filename(local_path)
|
105 |
print(f"✅ Downloaded {gcs_path} → {local_path}")
|
106 |
return True
|
|
|
92 |
return None, None
|
93 |
|
94 |
@st.cache_data(ttl=3600)
|
95 |
+
def download_file_from_gcs(_bucket, gcs_path, local_path):
|
96 |
"""Download a file from GCS to local storage."""
|
97 |
try:
|
98 |
# Check if file already exists
|
|
|
100 |
print(f"File already exists locally: {local_path}")
|
101 |
return True
|
102 |
|
103 |
+
blob = _bucket.blob(gcs_path)
|
104 |
blob.download_to_filename(local_path)
|
105 |
print(f"✅ Downloaded {gcs_path} → {local_path}")
|
106 |
return True
|