Update app.py
Browse files
app.py
CHANGED
@@ -60,9 +60,8 @@ class model:
|
|
60 |
|
61 |
nucleus_image = processed_images[0].unsqueeze(0)
|
62 |
protein_image = processed_images[1].unsqueeze(0)
|
63 |
-
protein_image = protein_image
|
64 |
-
protein_image = 1
|
65 |
-
|
66 |
|
67 |
formatted_predicted_sequence = run_sequence_prediction(
|
68 |
sequence_input=sequence_input,
|
@@ -110,7 +109,6 @@ with gr.Blocks(theme='gradio/soft') as demo:
|
|
110 |
nucleus_image = gr.Image(
|
111 |
source="upload",
|
112 |
tool="sketch",
|
113 |
-
invert_colors=True,
|
114 |
label="Nucleus Image",
|
115 |
interactive=True,
|
116 |
image_mode="L",
|
|
|
60 |
|
61 |
nucleus_image = processed_images[0].unsqueeze(0)
|
62 |
protein_image = processed_images[1].unsqueeze(0)
|
63 |
+
protein_image = protein_image/torch.max(protein_image)
|
64 |
+
protein_image = 1 - protein_image
|
|
|
65 |
|
66 |
formatted_predicted_sequence = run_sequence_prediction(
|
67 |
sequence_input=sequence_input,
|
|
|
109 |
nucleus_image = gr.Image(
|
110 |
source="upload",
|
111 |
tool="sketch",
|
|
|
112 |
label="Nucleus Image",
|
113 |
interactive=True,
|
114 |
image_mode="L",
|