BrendaTellez commited on
Commit
a9c75b0
·
1 Parent(s): f2a40df

download model

Browse files
Files changed (1) hide show
  1. app.py +18 -2
app.py CHANGED
@@ -1,3 +1,19 @@
1
- from transformers import pipeline
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- pipe=pipeline("audio-classification", model=BrendaTellez/sounds2)
 
1
+ import streamlit as st
2
+ from huggingface_hub import hf_hub_url, cached_download
3
+ import numpy as np
4
+ from audio_recorder_streamlit import audio_recorder
5
+ from model import RNN
6
+
7
+ REPO_ID = "BrendaTellez/sounds2"
8
+ FILENAME = "RNN60-GRU.h5"
9
+ RATE = 22050
10
+
11
+ @st.cache(allow_output_mutation=True)
12
+ def download_model():
13
+ model = tf.keras.models.load_model(
14
+ cached_download(hf_hub_url(REPO_ID, FILENAME)))
15
+ return model
16
+
17
+ model = download_model()
18
+ st.write(model.summary)
19