awacke1 commited on
Commit
8d59633
1 Parent(s): 34b6005

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -37
app.py CHANGED
@@ -68,40 +68,7 @@ with st.expander("Help / About 📚", expanded=False):
68
  ''')
69
 
70
 
71
- # -----------------------------------------------------------------Art Card Sidebar:
72
- # Get this from paste into markdown feature
73
- #image_url = "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/G_GkRD_IT3f14K7gWlbwi.png"
74
- #image_url2 = "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/gikaT871Mm8k6wuv4pl_g.png"
75
- #image_url3 = "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/gv1xmIiXh1NGTeeV-cYF2.png"
76
- #image_url4 = "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/2YsnDyc_nDNW71PPKozdN.png"
77
- #image_url5 = "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/eGii5DvGIuCtWCU08_i-D.png"
78
- #image_url6 = "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/2-KfxcuXRcTFiHf4XlNsX.png"
79
-
80
- #image_base64 = get_image_as_base64(image_url)
81
- #image_base642 = get_image_as_base64(image_url2)
82
- #image_base643 = get_image_as_base64(image_url3)
83
- #image_base644 = get_image_as_base64(image_url4)
84
- #image_base645 = get_image_as_base64(image_url5)
85
- #image_base646 = get_image_as_base64(image_url6)
86
-
87
- #if image_base644 is not None:
88
- # with st.sidebar:
89
- # st.markdown("""### Word Game AI""")
90
- #st.markdown(f"![image](data:image/png;base64,{image_base64})")
91
- # st.markdown(f"![image](data:image/png;base64,{image_base642})")
92
- # st.markdown(f"![image](data:image/png;base64,{image_base643})")
93
- # st.markdown(f"![image](data:image/png;base64,{image_base644})")
94
- #st.markdown(f"![image](data:image/png;base64,{image_base645})")
95
- #st.markdown(f"![image](data:image/png;base64,{image_base646})")
96
- #download_link = create_download_link("downloaded_image.png", image_base64)
97
- #st.markdown(download_link, unsafe_allow_html=True)
98
- #else:
99
- # st.sidebar.write("Failed to load the image.")
100
- # ------------------------------------------------------------- Art Card Sidebar
101
-
102
-
103
-
104
- # ---- Art Card Sidebar with random selection of image:
105
  def get_image_as_base64(url):
106
  response = requests.get(url)
107
  if response.status_code == 200:
@@ -116,12 +83,12 @@ def create_download_link(filename, base64_str):
116
 
117
  # List of image URLs
118
  image_urls = [
119
- "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/gikaT871Mm8k6wuv4pl_g.png",
120
  "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/gv1xmIiXh1NGTeeV-cYF2.png",
121
  "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/2YsnDyc_nDNW71PPKozdN.png",
122
  "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/G_GkRD_IT3f14K7gWlbwi.png",
123
- "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/eGii5DvGIuCtWCU08_i-D.png",
124
- "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/2-KfxcuXRcTFiHf4XlNsX.png"
125
  ]
126
 
127
  # Select a random URL from the list
 
68
  ''')
69
 
70
 
71
+ # ---- Art Card Sidebar with Random Selection of image:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  def get_image_as_base64(url):
73
  response = requests.get(url)
74
  if response.status_code == 200:
 
83
 
84
  # List of image URLs
85
  image_urls = [
86
+ #"https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/gikaT871Mm8k6wuv4pl_g.png",
87
  "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/gv1xmIiXh1NGTeeV-cYF2.png",
88
  "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/2YsnDyc_nDNW71PPKozdN.png",
89
  "https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/G_GkRD_IT3f14K7gWlbwi.png",
90
+ #"https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/eGii5DvGIuCtWCU08_i-D.png",
91
+ #"https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/2-KfxcuXRcTFiHf4XlNsX.png"
92
  ]
93
 
94
  # Select a random URL from the list