Update app.py
Browse files
app.py
CHANGED
@@ -159,7 +159,7 @@ def show_feedback():
|
|
159 |
print(f"Error: {e}") # Debug information
|
160 |
return {"error": str(e)}
|
161 |
|
162 |
-
TITLE = """<h1>Large Language Model (LLM) Playground 💬 <a href='https://
|
163 |
SUBTITLE = """<h2><a href='https://deep-learning-101.github.io' target='_blank'>deep-learning-101.github.io</a> | <a href='https://www.twman.org/AI' target='_blank'> AI </a> | <a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D.</a> | <a href='https://blog.twman.org/p/deeplearning101.html' target='_blank'>手把手帶你一起踩AI坑</a><br></h2>"""
|
164 |
LINKS = """
|
165 |
<a href='https://github.com/Deep-Learning-101' target='_blank'>Deep Learning 101 Github</a> | <a href='http://deeplearning101.twman.org' target='_blank'>Deep Learning 101</a> | <a href='https://www.facebook.com/groups/525579498272187/' target='_blank'>台灣人工智慧社團 FB</a> | <a href='https://www.youtube.com/c/DeepLearning101' target='_blank'>YouTube</a><br>
|
@@ -179,10 +179,12 @@ LINKS = """
|
|
179 |
"""
|
180 |
# 添加示例
|
181 |
examples = [
|
182 |
-
["
|
183 |
-
["
|
184 |
-
["
|
185 |
-
["
|
|
|
|
|
186 |
]
|
187 |
|
188 |
with gr.Blocks() as iface:
|
@@ -195,6 +197,9 @@ with gr.Blocks() as iface:
|
|
195 |
with gr.Row():
|
196 |
user_input = gr.Textbox(label='輸入您的問題', placeholder="在此輸入問題...")
|
197 |
submit_button = gr.Button("問題輸入好,請點我送出")
|
|
|
|
|
|
|
198 |
|
199 |
gr.Examples(examples=examples, inputs=user_input)
|
200 |
|
|
|
159 |
print(f"Error: {e}") # Debug information
|
160 |
return {"error": str(e)}
|
161 |
|
162 |
+
TITLE = """<h1>Large Language Model (LLM) Playground 💬 <a href='https://deep-learning-101.github.io/' target='_blank'>deep-learning-101.github.io FAQ</a></h1>"""
|
163 |
SUBTITLE = """<h2><a href='https://deep-learning-101.github.io' target='_blank'>deep-learning-101.github.io</a> | <a href='https://www.twman.org/AI' target='_blank'> AI </a> | <a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D.</a> | <a href='https://blog.twman.org/p/deeplearning101.html' target='_blank'>手把手帶你一起踩AI坑</a><br></h2>"""
|
164 |
LINKS = """
|
165 |
<a href='https://github.com/Deep-Learning-101' target='_blank'>Deep Learning 101 Github</a> | <a href='http://deeplearning101.twman.org' target='_blank'>Deep Learning 101</a> | <a href='https://www.facebook.com/groups/525579498272187/' target='_blank'>台灣人工智慧社團 FB</a> | <a href='https://www.youtube.com/c/DeepLearning101' target='_blank'>YouTube</a><br>
|
|
|
179 |
"""
|
180 |
# 添加示例
|
181 |
examples = [
|
182 |
+
["8.8.8.8", "ip"],
|
183 |
+
["e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "fileHash"],
|
184 |
+
["NVIDIA 最新新聞", "search"],
|
185 |
+
["deep learning book 第8章的重點是什麼", "dl101"],
|
186 |
+
["你可以幹什麼", "other"],
|
187 |
+
|
188 |
]
|
189 |
|
190 |
with gr.Blocks() as iface:
|
|
|
197 |
with gr.Row():
|
198 |
user_input = gr.Textbox(label='輸入您的問題', placeholder="在此輸入問題...")
|
199 |
submit_button = gr.Button("問題輸入好,請點我送出")
|
200 |
+
category = gr.Radio(label="Message Category", choices=[
|
201 |
+
"ip", "fileHash", "dl101", "other", "search"
|
202 |
+
])
|
203 |
|
204 |
gr.Examples(examples=examples, inputs=user_input)
|
205 |
|