Spaces:
Sleeping
Sleeping
Commit
·
fbf56bb
1
Parent(s):
48b5ec8
Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,8 @@ models = {'VGG16': 'vgg16', 'VGG19': 'vgg16', 'ResNet50V2': 'resnet_v2',
|
|
17 |
model_type2 = models[model_type]
|
18 |
|
19 |
top_n = st.sidebar.selectbox('Number of Results', (3, 5, 10))
|
|
|
|
|
20 |
|
21 |
exec(f'from keras.applications.{model_type2} import {model_type}')
|
22 |
exec(
|
@@ -47,3 +49,10 @@ df['Percent Certainty'] = df['Percent Certainty'].apply(
|
|
47 |
lambda x: '{:.2%}'.format(x))
|
48 |
|
49 |
st.dataframe(df)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
model_type2 = models[model_type]
|
18 |
|
19 |
top_n = st.sidebar.selectbox('Number of Results', (3, 5, 10))
|
20 |
+
results = st.sidebar.selectbox('Display Summary', ('No','Yes'))
|
21 |
+
|
22 |
|
23 |
exec(f'from keras.applications.{model_type2} import {model_type}')
|
24 |
exec(
|
|
|
49 |
lambda x: '{:.2%}'.format(x))
|
50 |
|
51 |
st.dataframe(df)
|
52 |
+
|
53 |
+
if results=='Yes':
|
54 |
+
stringlist = []
|
55 |
+
model.summary(print_fn=lambda x: stringlist.append(x))
|
56 |
+
short_model_summary = "\n".join(stringlist)
|
57 |
+
print(short_model_summary)
|
58 |
+
st.write(short_model_summary)
|