Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,7 @@ import gradio as gr
|
|
| 9 |
import matplotlib.pyplot as plt
|
| 10 |
import tempfile
|
| 11 |
import os
|
|
|
|
| 12 |
|
| 13 |
from huggingface_hub import snapshot_download
|
| 14 |
|
|
@@ -225,6 +226,7 @@ def predict_wsi(image):
|
|
| 225 |
pred_labels /= counter_tensor
|
| 226 |
return pred_labels
|
| 227 |
|
|
|
|
| 228 |
def segment_image(image):
|
| 229 |
# img = Image.open(image_path)
|
| 230 |
img = image
|
|
|
|
| 9 |
import matplotlib.pyplot as plt
|
| 10 |
import tempfile
|
| 11 |
import os
|
| 12 |
+
import spaces
|
| 13 |
|
| 14 |
from huggingface_hub import snapshot_download
|
| 15 |
|
|
|
|
| 226 |
pred_labels /= counter_tensor
|
| 227 |
return pred_labels
|
| 228 |
|
| 229 |
+
@spaces.GPU(duration=120)
|
| 230 |
def segment_image(image):
|
| 231 |
# img = Image.open(image_path)
|
| 232 |
img = image
|