Spaces:
Running
Running
ChenyuRabbitLove
commited on
Commit
•
39977eb
1
Parent(s):
471d917
fix: fix get_content() to fix the css issue
Browse files- app.py +3 -4
- utils/utils.py +1 -1
app.py
CHANGED
@@ -51,9 +51,8 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
|
|
51 |
)
|
52 |
|
53 |
with gr.Column(scale=1, elem_id="player_avatar_container"):
|
54 |
-
avatar = gr.
|
55 |
-
|
56 |
-
preview=True,
|
57 |
elem_id="player_avatar",
|
58 |
)
|
59 |
avatar_description = gr.Markdown(
|
@@ -85,7 +84,7 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
|
|
85 |
)
|
86 |
|
87 |
with gr.Row():
|
88 |
-
html = get_content("htmls/adventure_blank.html")
|
89 |
adventure_log = gr.HTML(html, label="Adventure Log", elem_id="adventure_log")
|
90 |
|
91 |
# handling player info
|
|
|
51 |
)
|
52 |
|
53 |
with gr.Column(scale=1, elem_id="player_avatar_container"):
|
54 |
+
avatar = gr.Image(
|
55 |
+
"medias/avatar.png",
|
|
|
56 |
elem_id="player_avatar",
|
57 |
)
|
58 |
avatar_description = gr.Markdown(
|
|
|
84 |
)
|
85 |
|
86 |
with gr.Row():
|
87 |
+
html = "<div style='max-width:100%; max-height:360px; overflow:auto'>" + get_content("htmls/adventure_blank.html")
|
88 |
adventure_log = gr.HTML(html, label="Adventure Log", elem_id="adventure_log")
|
89 |
|
90 |
# handling player info
|
utils/utils.py
CHANGED
@@ -11,7 +11,7 @@ MEDIA_FILE_TYPE = ".png"
|
|
11 |
def get_content(file_name: str) -> str:
|
12 |
with open(file_name, "r", encoding="utf-8") as file:
|
13 |
content = file.read()
|
14 |
-
return
|
15 |
|
16 |
|
17 |
def get_player_partners(player_info: gr.State) -> List[str]:
|
|
|
11 |
def get_content(file_name: str) -> str:
|
12 |
with open(file_name, "r", encoding="utf-8") as file:
|
13 |
content = file.read()
|
14 |
+
return content
|
15 |
|
16 |
|
17 |
def get_player_partners(player_info: gr.State) -> List[str]:
|