Spaces:
Running
Running
anshul-rohilla4 commited on
Commit ·
c441b91
1
Parent(s): ca00231
fix nyuad local path and public host
Browse files- app.py +0 -1
- image_detector.py +2 -2
app.py
CHANGED
|
@@ -151,7 +151,6 @@ def download_pdf():
|
|
| 151 |
|
| 152 |
# =======================
|
| 153 |
if __name__ == "__main__":
|
| 154 |
-
app.run(debug=False)
|
| 155 |
app.run(host="0.0.0.0", port=7860, debug=False)
|
| 156 |
|
| 157 |
# .venv\Scripts\activate
|
|
|
|
| 151 |
|
| 152 |
# =======================
|
| 153 |
if __name__ == "__main__":
|
|
|
|
| 154 |
app.run(host="0.0.0.0", port=7860, debug=False)
|
| 155 |
|
| 156 |
# .venv\Scripts\activate
|
image_detector.py
CHANGED
|
@@ -56,8 +56,8 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
| 56 |
NYUAD_PATH = os.path.join(BASE_DIR, "nyuad_model")
|
| 57 |
|
| 58 |
try:
|
| 59 |
-
nyuad_processor = ViTImageProcessor.from_pretrained(NYUAD_PATH)
|
| 60 |
-
nyuad_model = AutoModelForImageClassification.from_pretrained(NYUAD_PATH, trust_remote_code=True)
|
| 61 |
nyuad_model.eval()
|
| 62 |
NYUAD_AVAILABLE = True
|
| 63 |
print("✓ NYUAD loaded")
|
|
|
|
| 56 |
NYUAD_PATH = os.path.join(BASE_DIR, "nyuad_model")
|
| 57 |
|
| 58 |
try:
|
| 59 |
+
nyuad_processor = ViTImageProcessor.from_pretrained(NYUAD_PATH, local_files_only=True)
|
| 60 |
+
nyuad_model = AutoModelForImageClassification.from_pretrained(NYUAD_PATH, trust_remote_code=True, local_files_only=True)
|
| 61 |
nyuad_model.eval()
|
| 62 |
NYUAD_AVAILABLE = True
|
| 63 |
print("✓ NYUAD loaded")
|