Spaces:
Build error
Build error
Commit
·
cbcc1be
1
Parent(s):
2acf609
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,11 +17,6 @@ HUGGINGFACEHUB_API_TOKEN = os.getenv("HUGGINGFACEHUB_API_TOKEN")
|
|
| 17 |
|
| 18 |
# 用户输入
|
| 19 |
url = st.text_input("Enter the URL to chat with:")
|
| 20 |
-
# 检查 URL 是否以 "https://mp.weixin.qq.com" 开始
|
| 21 |
-
if not url.startswith("https://mp.weixin.qq.com"):
|
| 22 |
-
# 如果不是,则显示错误信息并终止程序
|
| 23 |
-
st.error("URL is incorrect. Please enter a URL that starts with 'https://mp.weixin.qq.com'.")
|
| 24 |
-
st.stop()
|
| 25 |
print(f"URL Entered: "+url)
|
| 26 |
print()
|
| 27 |
question = st.text_input("Enter your question:")
|
|
@@ -30,6 +25,11 @@ print()
|
|
| 30 |
|
| 31 |
# 当用户点击按钮时
|
| 32 |
if st.button('Get AI Response'):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
if url and question:
|
| 34 |
print(f"URL & Question Entered & Button clicked.")
|
| 35 |
print()
|
|
|
|
| 17 |
|
| 18 |
# 用户输入
|
| 19 |
url = st.text_input("Enter the URL to chat with:")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
print(f"URL Entered: "+url)
|
| 21 |
print()
|
| 22 |
question = st.text_input("Enter your question:")
|
|
|
|
| 25 |
|
| 26 |
# 当用户点击按钮时
|
| 27 |
if st.button('Get AI Response'):
|
| 28 |
+
# 检查 URL 是否以 "https://mp.weixin.qq.com" 开始
|
| 29 |
+
if not url.startswith("https://mp.weixin.qq.com"):
|
| 30 |
+
# 如果不是,则显示错误信息并终止程序
|
| 31 |
+
st.write("URL is incorrect. Please enter a URL that starts with 'https://mp.weixin.qq.com'.")
|
| 32 |
+
st.stop()
|
| 33 |
if url and question:
|
| 34 |
print(f"URL & Question Entered & Button clicked.")
|
| 35 |
print()
|