Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,13 +69,16 @@ repo_dir = snapshot_download(
|
|
| 69 |
force_download=True # Forces redownload
|
| 70 |
)
|
| 71 |
|
| 72 |
-
print("the
|
| 73 |
|
| 74 |
# The fine-tuned model is located in "fine_tuned_llama3" inside the Space
|
| 75 |
fine_tuned_model_path = os.path.join(repo_dir, "fine_tuned_llama3")
|
| 76 |
|
| 77 |
adapter_config_path = os.path.join(fine_tuned_model_path, "adapter_config.json")
|
| 78 |
|
|
|
|
|
|
|
|
|
|
| 79 |
if not os.path.exists(adapter_config_path):
|
| 80 |
raise FileNotFoundError(f"adapter_config.json not found in {fine_tuned_model_path}. Check if the model was downloaded correctly.")
|
| 81 |
|
|
@@ -84,8 +87,7 @@ if not os.path.exists(fine_tuned_model_path):
|
|
| 84 |
raise FileNotFoundError(f"Fine-tuned model not found at {fine_tuned_model_path}")
|
| 85 |
|
| 86 |
|
| 87 |
-
|
| 88 |
-
print("Files in Model Directory:", os.listdir(fine_tuned_model_path))
|
| 89 |
|
| 90 |
|
| 91 |
# Add repo directory to sys.path
|
|
|
|
| 69 |
force_download=True # Forces redownload
|
| 70 |
)
|
| 71 |
|
| 72 |
+
print("the parent Directory is ", os.listdir(repo_dir))
|
| 73 |
|
| 74 |
# The fine-tuned model is located in "fine_tuned_llama3" inside the Space
|
| 75 |
fine_tuned_model_path = os.path.join(repo_dir, "fine_tuned_llama3")
|
| 76 |
|
| 77 |
adapter_config_path = os.path.join(fine_tuned_model_path, "adapter_config.json")
|
| 78 |
|
| 79 |
+
print("Downloaded Model Path:", fine_tuned_model_path)
|
| 80 |
+
print("Files in Model Directory:", os.listdir(fine_tuned_model_path))
|
| 81 |
+
|
| 82 |
if not os.path.exists(adapter_config_path):
|
| 83 |
raise FileNotFoundError(f"adapter_config.json not found in {fine_tuned_model_path}. Check if the model was downloaded correctly.")
|
| 84 |
|
|
|
|
| 87 |
raise FileNotFoundError(f"Fine-tuned model not found at {fine_tuned_model_path}")
|
| 88 |
|
| 89 |
|
| 90 |
+
|
|
|
|
| 91 |
|
| 92 |
|
| 93 |
# Add repo directory to sys.path
|