Upload app.py with huggingface_hub
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from huggingface_hub import from_pretrained_keras
|
| 2 |
+
import gradio as gr
|
| 3 |
+
import tensorflow as tf
|
| 4 |
+
|
| 5 |
+
model = from_pretrained_keras("emresvd/u304")
|
| 6 |
+
|
| 7 |
+
gr.Interface(
|
| 8 |
+
fn=lambda: model(tf.random.normal([1, 100]), training=False).numpy()[0, :, :, ::-1],
|
| 9 |
+
inputs=[],
|
| 10 |
+
outputs=gr.Image(label="output", type="numpy", show_download_button=True, height=64 * 8, width=64 * 8),
|
| 11 |
+
).launch()
|