Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def download_weights():
|
|
| 32 |
|
| 33 |
try:
|
| 34 |
#download_weights()
|
| 35 |
-
model = models.CellposeModel(gpu=True, pretrained_model="
|
| 36 |
except Exception as e:
|
| 37 |
print(f"Error loading model: {e}")
|
| 38 |
exit(1)
|
|
@@ -227,7 +227,7 @@ with gr.Blocks(title = "Hello",
|
|
| 227 |
with gr.Row():
|
| 228 |
with gr.Column(scale=2):
|
| 229 |
gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:white;">Cellpose-SAM for cellular segmentation</div>""")
|
| 230 |
-
gr.HTML("""<h4 style="color:white;">You may need to refresh/login for 5 minutes of free GPU compute/day. <br> "pip install cellpose" for full functionality. </h4>""")
|
| 231 |
#gr.HTML("""<h4 style="color:white;">"pip install cellpose" for full functionality. </h4>""")
|
| 232 |
|
| 233 |
input_image = gr.Image(label = "Input image", type = "filepath")
|
|
|
|
| 32 |
|
| 33 |
try:
|
| 34 |
#download_weights()
|
| 35 |
+
model = models.CellposeModel(gpu=True, pretrained_model="cpsam")
|
| 36 |
except Exception as e:
|
| 37 |
print(f"Error loading model: {e}")
|
| 38 |
exit(1)
|
|
|
|
| 227 |
with gr.Row():
|
| 228 |
with gr.Column(scale=2):
|
| 229 |
gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:white;">Cellpose-SAM for cellular segmentation</div>""")
|
| 230 |
+
gr.HTML("""<h4 style="color:white;">You may need to refresh/login for 5 minutes of free GPU compute/day. <br> "pip install cellpose[gui]" for full functionality. </h4>""")
|
| 231 |
#gr.HTML("""<h4 style="color:white;">"pip install cellpose" for full functionality. </h4>""")
|
| 232 |
|
| 233 |
input_image = gr.Image(label = "Input image", type = "filepath")
|