Update app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,10 @@ from frontPrompt import main as main_f
|
|
| 11 |
model_path = "best.pt"
|
| 12 |
model = YOLO(model_path)
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
def preprocessing(image):
|
| 16 |
"""Apply three enhancement filters, including brightness reduction, and resize."""
|
|
|
|
| 11 |
model_path = "best.pt"
|
| 12 |
model = YOLO(model_path)
|
| 13 |
|
| 14 |
+
os.system("pip install --force-reinstall 'https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_multi-backend-refactor/bitsandbytes-0.44.1.dev0-py3-none-win_amd64.whl'")
|
| 15 |
+
os.system("pip install intel_extension_for_pytorch")
|
| 16 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = "" # Forces CPU mode
|
| 17 |
+
|
| 18 |
|
| 19 |
def preprocessing(image):
|
| 20 |
"""Apply three enhancement filters, including brightness reduction, and resize."""
|