Stevenqaq commited on
Commit
92abfde
·
verified ·
1 Parent(s): 25fa76c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -4,24 +4,18 @@ import requests
4
  import streamlit as st
5
 
6
  """
7
- # HeartNet
8
- This is a classifier for images of 12-lead EKGs. It will attempt to detect whether the EKG indicates an acute MI. It was trained on simulated images.
9
  """
10
-
11
  def predict(img):
12
  st.image(img, caption="Your image", use_column_width=True)
13
  pred, key, probs = learn_inf.predict(img)
14
  # st.write(learn_inf.predict(img))
15
 
16
- f"""
17
- ## This **{'is ' if pred == 'mi' else 'is not'}** an MI (heart attack).
18
- ### Rediction result: {pred}
19
- ### Probability of {pred}: {probs[key].item()*100: .2f}%
20
- """
21
 
22
 
23
  path = "./"
24
- learn_inf = load_learner(path + "demo_model.pkl")
25
 
26
  option = st.radio("", ["Upload Image", "Image URL"])
27
 
 
4
  import streamlit as st
5
 
6
  """
7
+ # Sustainable energy classifacation
8
+ This is a classifier for images ofSustainable energy.
9
  """
 
10
  def predict(img):
11
  st.image(img, caption="Your image", use_column_width=True)
12
  pred, key, probs = learn_inf.predict(img)
13
  # st.write(learn_inf.predict(img))
14
 
 
 
 
 
 
15
 
16
 
17
  path = "./"
18
+ learn_inf = load_learner(path + "resnet34_stage-1.pkl")
19
 
20
  option = st.radio("", ["Upload Image", "Image URL"])
21