Spaces:
Runtime error
Runtime error
Commit ·
deda35b
1
Parent(s): 7010b1d
Cleanup imports
Browse files
app.py
CHANGED
|
@@ -1,17 +1,7 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
|
| 4 |
-
# return "Hello " + name + "!!"
|
| 5 |
-
|
| 6 |
-
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
-
# iface.launch()
|
| 8 |
|
| 9 |
-
import fastbook
|
| 10 |
-
from fastbook import *
|
| 11 |
-
from fastai.vision.widgets import *
|
| 12 |
-
import skimage
|
| 13 |
-
from skimage import io as skio
|
| 14 |
-
import numpy
|
| 15 |
from PIL import Image, ImageEnhance
|
| 16 |
import torchvision.transforms as T
|
| 17 |
|
|
@@ -37,7 +27,5 @@ def process_zebrafish_image(img):
|
|
| 37 |
#return dict(zip(pred, map(float,age)))
|
| 38 |
return dict(zip(T.ToPILImage(pred), map(float,age)))
|
| 39 |
|
| 40 |
-
import gradio as gr
|
| 41 |
-
|
| 42 |
intf = gr.Interface(fn=process_zebrafish_image, inputs=gr.inputs.Image(shape=(512, 512)), outputs=[gr.outputs.Image(), gr.outputs.Label()]).launch(share=True)
|
| 43 |
intf.launch(inline=False)
|
|
|
|
| 1 |
+
from fastai.vision.all import *
|
| 2 |
|
| 3 |
+
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
from PIL import Image, ImageEnhance
|
| 6 |
import torchvision.transforms as T
|
| 7 |
|
|
|
|
| 27 |
#return dict(zip(pred, map(float,age)))
|
| 28 |
return dict(zip(T.ToPILImage(pred), map(float,age)))
|
| 29 |
|
|
|
|
|
|
|
| 30 |
intf = gr.Interface(fn=process_zebrafish_image, inputs=gr.inputs.Image(shape=(512, 512)), outputs=[gr.outputs.Image(), gr.outputs.Label()]).launch(share=True)
|
| 31 |
intf.launch(inline=False)
|