Lashtw commited on
Commit
54f77f5
·
verified ·
1 Parent(s): 02b3da0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -46,7 +46,7 @@ if 'page' not in st.session_state:
46
  # 顯示當前頁面的圖片,放大至幾乎全版面
47
  st.image(image_data[st.session_state.page]["path"],
48
  caption=image_data[st.session_state.page]["caption"],
49
- use_container_width=True)
50
 
51
  # 換頁按鈕
52
  col1, col2 = st.columns(2)
@@ -116,7 +116,7 @@ def main():
116
  buf = io.BytesIO()
117
  qr_img.save(buf, format="PNG")
118
  byte_im = buf.getvalue()
119
- st.image(byte_im, caption="掃描此 QR Code 前往表單", use_column_width=False)
120
  except Exception as e:
121
  st.error(f"生成 QR Code 時發生錯誤: {str(e)}")
122
 
@@ -130,7 +130,7 @@ def main():
130
  index=3 # 預設選 7 位
131
  )
132
 
133
- # 檔案上傳部分(還原手動上傳)
134
  uploaded_file = st.file_uploader("請上傳CSV檔案", type=['csv'])
135
 
136
  if uploaded_file:
 
46
  # 顯示當前頁面的圖片,放大至幾乎全版面
47
  st.image(image_data[st.session_state.page]["path"],
48
  caption=image_data[st.session_state.page]["caption"],
49
+ use_container_width=True) # 修正為 use_container_width
50
 
51
  # 換頁按鈕
52
  col1, col2 = st.columns(2)
 
116
  buf = io.BytesIO()
117
  qr_img.save(buf, format="PNG")
118
  byte_im = buf.getvalue()
119
+ st.image(byte_im, caption="掃描此 QR Code 前往表單", use_container_width=False) # 修正為 use_container_width=False
120
  except Exception as e:
121
  st.error(f"生成 QR Code 時發生錯誤: {str(e)}")
122
 
 
130
  index=3 # 預設選 7 位
131
  )
132
 
133
+ # 檔案上傳部分
134
  uploaded_file = st.file_uploader("請上傳CSV檔案", type=['csv'])
135
 
136
  if uploaded_file: