Spaces:
Runtime error
Runtime error
Update app.py
Browse filesLoading model from the hub
app.py
CHANGED
|
@@ -4,11 +4,12 @@ import numpy as np
|
|
| 4 |
import streamlit as st
|
| 5 |
import tensorflow as tf
|
| 6 |
import matplotlib.pyplot as plt
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
@st.cache(allow_output_mutation=True)
|
| 10 |
def load_model():
|
| 11 |
-
generator =
|
| 12 |
return generator
|
| 13 |
|
| 14 |
def generate(n_images, generator, seed=42, codings_size=100):
|
|
|
|
| 4 |
import streamlit as st
|
| 5 |
import tensorflow as tf
|
| 6 |
import matplotlib.pyplot as plt
|
| 7 |
+
from huggingface_hub import from_pretrained_keras
|
| 8 |
|
| 9 |
|
| 10 |
@st.cache(allow_output_mutation=True)
|
| 11 |
def load_model():
|
| 12 |
+
generator = from_pretrained_keras("huggan/crypto-gan")
|
| 13 |
return generator
|
| 14 |
|
| 15 |
def generate(n_images, generator, seed=42, codings_size=100):
|