Commit
·
6d1d4b7
1
Parent(s):
59fcc5f
Update app.py
Browse files
app.py
CHANGED
@@ -29,10 +29,11 @@ print()
|
|
29 |
|
30 |
# 当用户点击按钮时
|
31 |
if st.button('Get AI Response'):
|
32 |
-
# 检查 URL 是否以 "https://
|
33 |
-
if not url.startswith("https://mp.weixin.qq.com"):
|
|
|
34 |
# 如果不是,则显示错误信息并终止程序
|
35 |
-
st.write("URL is incorrect. Please enter a URL that starts with 'https://
|
36 |
st.stop()
|
37 |
if url and question:
|
38 |
print(f"URL & Question Entered & Button clicked.")
|
|
|
29 |
|
30 |
# 当用户点击按钮时
|
31 |
if st.button('Get AI Response'):
|
32 |
+
# 检查 URL 是否以 "https://" 或 'http://' 开始
|
33 |
+
#if not url.startswith("https://mp.weixin.qq.com"):
|
34 |
+
if not url.startswith(("https://", "http://")):
|
35 |
# 如果不是,则显示错误信息并终止程序
|
36 |
+
st.write("URL is incorrect. Please enter a URL that starts with 'https://' or 'http://'.")
|
37 |
st.stop()
|
38 |
if url and question:
|
39 |
print(f"URL & Question Entered & Button clicked.")
|