Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
LAE
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
文靖昊
LAE
Commits
abe4fd0a
Commit
abe4fd0a
authored
9 months ago
by
陈正乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gradio隐藏用户选择按钮
parent
3c3636bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
gradio_test.py
test/gradio_test.py
+3
-3
No files found.
test/gradio_test.py
View file @
abe4fd0a
...
@@ -95,12 +95,12 @@ def main():
...
@@ -95,12 +95,12 @@ def main():
gr
.
HTML
(
"""<h1 align="center">低空经济知识问答</h1>"""
)
gr
.
HTML
(
"""<h1 align="center">低空经济知识问答</h1>"""
)
with
gr
.
Row
():
with
gr
.
Row
():
with
gr
.
Column
(
scale
=
2
):
with
gr
.
Column
(
scale
=
2
):
users
=
gr
.
components
.
Radio
(
choices
=
users_l
,
label
=
"选择一个用户"
,
value
=
users_l
[
0
],
interactive
=
True
)
users
=
gr
.
components
.
Radio
(
choices
=
users_l
,
label
=
"选择一个用户"
,
value
=
users_l
[
0
],
interactive
=
True
,
visible
=
False
)
chats
=
gr
.
components
.
Radio
(
choices
=
chats_l
,
label
=
"选择一个对话"
,
value
=
chats_l
[
0
],
interactive
=
True
)
chats
=
gr
.
components
.
Radio
(
choices
=
chats_l
,
label
=
"选择一个对话"
,
value
=
chats_l
[
0
],
interactive
=
True
)
with
gr
.
Column
(
scale
=
8
):
with
gr
.
Column
(
scale
=
8
):
chatbot
=
gr
.
Chatbot
(
bubble_full_width
=
False
,
chatbot
=
gr
.
Chatbot
(
bubble_full_width
=
False
,
avatar_images
=
(
ICON_PATH
+
'
\\
user.png'
,
ICON_PATH
+
"
\\
bot.png"
),
avatar_images
=
(
ICON_PATH
+
'
\\
user.png'
,
ICON_PATH
+
"
\\
bot.png"
),
value
=
show_history
())
value
=
show_history
()
,
height
=
400
)
input_text
=
gr
.
Textbox
(
show_label
=
True
,
lines
=
3
,
label
=
"文本输入"
)
input_text
=
gr
.
Textbox
(
show_label
=
True
,
lines
=
3
,
label
=
"文本输入"
)
sub_btn
=
gr
.
Button
(
"提交"
)
sub_btn
=
gr
.
Button
(
"提交"
)
...
@@ -127,7 +127,7 @@ def main():
...
@@ -127,7 +127,7 @@ def main():
restart_btn
,
None
,
sub_btn
restart_btn
,
None
,
sub_btn
)
)
demo
.
queue
()
.
launch
(
share
=
False
,
inbrowser
=
True
,
server_name
=
GR_SERVER_NAME
,
server_port
=
GR_PORT
)
demo
.
queue
()
.
launch
(
share
=
False
,
inbrowser
=
True
,
server_name
=
'192.168.22.127'
,
server_port
=
GR_PORT
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment