Spaces:
Build error
Build error
Commit
·
819d283
1
Parent(s):
c11a5af
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,10 @@ import gradio as gr
|
|
| 14 |
from huggingface_hub.keras_mixin import from_pretrained_keras
|
| 15 |
from itertools import cycle, islice
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
#Function that predicts on only 1 sample
|
| 18 |
def predict_sample(image):
|
| 19 |
prediction = model.predict(image[tf.newaxis, ...])
|
|
@@ -179,7 +183,6 @@ def visual_clustering(cluster_type, num_clusters, num_samples, random_state, med
|
|
| 179 |
|
| 180 |
return fig1, fig2
|
| 181 |
|
| 182 |
-
model= from_pretrained_keras("tareknaous/unet-visual-clustering")
|
| 183 |
|
| 184 |
iface = gr.Interface(
|
| 185 |
|
|
|
|
| 14 |
from huggingface_hub.keras_mixin import from_pretrained_keras
|
| 15 |
from itertools import cycle, islice
|
| 16 |
|
| 17 |
+
|
| 18 |
+
model = from_pretrained_keras("tareknaous/unet-visual-clustering")
|
| 19 |
+
|
| 20 |
+
|
| 21 |
#Function that predicts on only 1 sample
|
| 22 |
def predict_sample(image):
|
| 23 |
prediction = model.predict(image[tf.newaxis, ...])
|
|
|
|
| 183 |
|
| 184 |
return fig1, fig2
|
| 185 |
|
|
|
|
| 186 |
|
| 187 |
iface = gr.Interface(
|
| 188 |
|