valencar commited on
Commit
03feec9
·
1 Parent(s): 7c09b47
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -2,6 +2,12 @@ import streamlit as st
2
  import numpy as np
3
  import keras
4
  from keras.preprocessing import image
 
 
 
 
 
 
5
 
6
  # Remove whitespace from the top of the page
7
  reduce_header_height_style = """
@@ -47,6 +53,7 @@ st.markdown(f'<div style="padding-top:30px; padding-bottom:2px; font-size:40px;f
47
 
48
  @st.cache_data
49
  def inicializa_modelo():
 
50
  print('carregando o modelo...')
51
  #with st.spinner('carregando o modelo...'):
52
  file = "modelo_raiox_TransferLearning_InceptionResNetV2"
@@ -56,6 +63,14 @@ def inicializa_modelo():
56
 
57
  return model
58
 
 
 
 
 
 
 
 
 
59
  if 'model' not in st.session_state:
60
  with st.spinner('carregando o modelo...'):
61
  st.session_state.model = inicializa_modelo()
@@ -85,11 +100,15 @@ st.markdown(f'<div style="color: #856404; background-color: #fff3cd; border-colo
85
 
86
  st.write("")
87
  st.write("")
 
88
  st.write("")
89
  st.write("")
90
  st.write("")
91
  st.write("")
92
  st.write("")
 
 
 
93
 
94
  footer="\
95
  <div > \
 
2
  import numpy as np
3
  import keras
4
  from keras.preprocessing import image
5
+ <<<<<<< HEAD
6
+ =======
7
+ from huggingface_hub import from_pretrained_keras
8
+
9
+
10
+ >>>>>>> 53fd989 (er)
11
 
12
  # Remove whitespace from the top of the page
13
  reduce_header_height_style = """
 
53
 
54
  @st.cache_data
55
  def inicializa_modelo():
56
+ <<<<<<< HEAD
57
  print('carregando o modelo...')
58
  #with st.spinner('carregando o modelo...'):
59
  file = "modelo_raiox_TransferLearning_InceptionResNetV2"
 
63
 
64
  return model
65
 
66
+ =======
67
+ print('carregando o modelo...')
68
+ model = from_pretrained_keras("valencar/modelo_raios_x")
69
+ print('modelo carregado.')
70
+
71
+ return model
72
+
73
+ >>>>>>> 53fd989 (er)
74
  if 'model' not in st.session_state:
75
  with st.spinner('carregando o modelo...'):
76
  st.session_state.model = inicializa_modelo()
 
100
 
101
  st.write("")
102
  st.write("")
103
+ <<<<<<< HEAD
104
  st.write("")
105
  st.write("")
106
  st.write("")
107
  st.write("")
108
  st.write("")
109
+ =======
110
+
111
+ >>>>>>> 53fd989 (er)
112
 
113
  footer="\
114
  <div > \