Dimitre commited on
Commit
d7e3777
1 Parent(s): 97c3584

Update app.py

Browse files

Loading model from the hub

Files changed (1) hide show
  1. app.py +2 -1
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 = tf.keras.models.load_model("./models/")
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):