Nuno-Tome commited on
Commit
edb85a8
·
1 Parent(s): 217e21b

BMC bug fix

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -76,7 +76,20 @@ def main():
76
  st.title("Image Classification")
77
  st.write("This is a simple web app to test and compare different image classifier models using Hugging Face's image-classification pipeline.")
78
  st.write("From time to time more models will be added to the list. If you want to add a model, please open an issue on the GitHub repository.")
79
- st.markdown("<img src='https://helloimjessa.files.wordpress.com/2021/06/bmc-button.png?w=1024' width='15%'>", unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
  input_image = st.file_uploader("Upload Image")
82
  shosen_model = st.selectbox("Select the model to use", MODELS)
@@ -84,11 +97,11 @@ def main():
84
 
85
  if input_image is not None:
86
  image_to_classify = Image.open(input_image)
87
- st.image(image_to_classify, caption="Uploaded Image", use_column_width=True)
88
  if st.button("Classify"):
89
  image_to_classify = Image.open(input_image)
90
  classification_obj1 =[]
91
- avable_models = st.selectbox
92
 
93
  classification_result = classify(image_to_classify, shosen_model)
94
  classification_obj1.append(classification_result)
 
76
  st.title("Image Classification")
77
  st.write("This is a simple web app to test and compare different image classifier models using Hugging Face's image-classification pipeline.")
78
  st.write("From time to time more models will be added to the list. If you want to add a model, please open an issue on the GitHub repository.")
79
+
80
+ # Buy me a Coffee Setup
81
+ bmc_link = "https://www.buymeacoffee.com/nuno.tome"
82
+ image_url = "https://helloimjessa.files.wordpress.com/2021/06/bmc-button.png?w=150" # Image URL
83
+ image_size = "150px" # Image size
84
+ #image_link_markdown = f"<img src='{image_url}' width='25%'>"
85
+ image_link_markdown = f"[![Buy Me a Coffee]({image_url})]({bmc_link})"
86
+
87
+ #image_link_markdown = f"[![Buy Me a Coffee]({image_url})]({bmc_link})" # Create a clickable image link
88
+
89
+ st.markdown(image_link_markdown, unsafe_allow_html=True) # Display the image link
90
+ # Buy me a Coffee Setup
91
+
92
+ #st.markdown("<img src='https://helloimjessa.files.wordpress.com/2021/06/bmc-button.png?w=1024' width='15%'>", unsafe_allow_html=True)
93
 
94
  input_image = st.file_uploader("Upload Image")
95
  shosen_model = st.selectbox("Select the model to use", MODELS)
 
97
 
98
  if input_image is not None:
99
  image_to_classify = Image.open(input_image)
100
+ st.image(image_to_classify, caption="Uploaded Image")
101
  if st.button("Classify"):
102
  image_to_classify = Image.open(input_image)
103
  classification_obj1 =[]
104
+ #avable_models = st.selectbox
105
 
106
  classification_result = classify(image_to_classify, shosen_model)
107
  classification_obj1.append(classification_result)