Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,15 @@
|
|
1 |
import subprocess
|
|
|
2 |
|
3 |
-
|
4 |
-
subprocess.run(["
|
5 |
-
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
import gradio as gr
|
9 |
import torch
|
|
|
1 |
import subprocess
|
2 |
+
import sys
|
3 |
|
4 |
+
print("Installing mednextv1...")
|
5 |
+
subprocess.run([sys.executable, "-m", "pip", "install", "--force-reinstall", "git+https://github.com/FrancescoLR/MedNeXt.git"])
|
|
|
6 |
|
7 |
+
try:
|
8 |
+
from mednextv1 import create_mednext_encoder_v1
|
9 |
+
print("Successfully imported mednextv1!")
|
10 |
+
except ModuleNotFoundError:
|
11 |
+
print("ERROR: mednextv1 still not found after reinstalling!")
|
12 |
+
|
13 |
|
14 |
import gradio as gr
|
15 |
import torch
|