Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
-
from huggingface_hub import hf_hub_download
|
3 |
from prediction import run_sequence_prediction
|
4 |
import torch
|
5 |
import torchvision.transforms as T
|
@@ -9,11 +8,8 @@ from matplotlib import pyplot as plt
|
|
9 |
|
10 |
|
11 |
def gradio_demo(model_name, sequence_input, image):
|
12 |
-
model =
|
13 |
-
config =
|
14 |
-
hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="nucleus_vqgan.yaml")
|
15 |
-
hf_hub_download(repo_id=f"HuangLab/{model_name}", filename="threshold_vqgan.yaml")
|
16 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
17 |
|
18 |
if "Finetuned" in model_name:
|
19 |
dataset = "OpenCell"
|
|
|
1 |
import gradio as gr
|
|
|
2 |
from prediction import run_sequence_prediction
|
3 |
import torch
|
4 |
import torchvision.transforms as T
|
|
|
8 |
|
9 |
|
10 |
def gradio_demo(model_name, sequence_input, image):
|
11 |
+
model = f"CELL-E_2-Image_Prediction/models/{model_name}.ckpt"
|
12 |
+
config = f"CELL-E_2-Image_Prediction/models/{model_name}.yaml"
|
|
|
|
|
|
|
13 |
|
14 |
if "Finetuned" in model_name:
|
15 |
dataset = "OpenCell"
|