haepada commited on
Commit
47d9b1a
·
verified ·
1 Parent(s): 6e4b510

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -7
app.py CHANGED
@@ -1091,21 +1091,21 @@ def create_interface():
1091
  }
1092
 
1093
  /* 이미지 컨테이너 스타일 */
1094
- .location-image-container,
1095
- .oncheon-image-container {
1096
  width: 100%;
1097
  margin: 1rem 0;
1098
  text-align: center;
1099
  }
1100
-
1101
- .location-image,
1102
- .oncheon-image {
1103
  width: 100%;
1104
- max-width: 600px;
1105
  height: auto;
1106
  border-radius: 12px;
1107
  margin: 0 auto;
1108
  }
 
 
1109
  """
1110
 
1111
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
@@ -1198,7 +1198,13 @@ def create_interface():
1198
  location_image = encode_image_to_base64("static/location.png")
1199
  gr.HTML(f"""
1200
  <div class="location-image-container">
1201
- <img src="data:image/png;base64,{location_image}" alt="위치 안내 이미지" class="location-image">
 
 
 
 
 
 
1202
  </div>
1203
  """)
1204
  gr.Markdown("""
 
1091
  }
1092
 
1093
  /* 이미지 컨테이너 스타일 */
1094
+ .location-image-container {
 
1095
  width: 100%;
1096
  margin: 1rem 0;
1097
  text-align: center;
1098
  }
1099
+
1100
+ .location-image {
 
1101
  width: 100%;
1102
+ max-width: 100%;
1103
  height: auto;
1104
  border-radius: 12px;
1105
  margin: 0 auto;
1106
  }
1107
+
1108
+ }
1109
  """
1110
 
1111
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
 
1198
  location_image = encode_image_to_base64("static/location.png")
1199
  gr.HTML(f"""
1200
  <div class="location-image-container">
1201
+ <picture>
1202
+ <!-- 모바일 이미지 -->
1203
+ <source media="(max-width: 600px)" srcset="static/location.png">
1204
+ <!-- 데스크톱 이미지 -->
1205
+ <source media="(min-width: 601px)" srcset="static/location_w.png">
1206
+ <img src="static/location.png" alt="위치 안내 이미지" class="location-image">
1207
+ </picture>
1208
  </div>
1209
  """)
1210
  gr.Markdown("""