Spaces:
Build error
Build error
Commit
Β·
980e069
1
Parent(s):
340bd0a
Update
Browse files
app.py
CHANGED
|
@@ -34,8 +34,7 @@ from gen_t2m import load_vq_model, load_res_model, load_trans_model, load_len_es
|
|
| 34 |
|
| 35 |
clip_version = 'ViT-B/32'
|
| 36 |
|
| 37 |
-
|
| 38 |
-
WEBSITE = f"""
|
| 39 |
<div class="embed_hidden">
|
| 40 |
<h1 style='text-align: center'> MoMask: Generative Masked Modeling of 3D Human Motions </h1>
|
| 41 |
<h2 style='text-align: center'>
|
|
@@ -55,7 +54,6 @@ WEBSITE = f"""
|
|
| 55 |
<a target="_blank" href="https://ericguo5513.github.io/source_files/momask_2023_bib.txt"> <button type="button" class="btn btn-primary btn-lg"> BibTex </button></a>  
|
| 56 |
<a target="_blank" href="https://huggingface.co/spaces/MeYourHint/MoMask?docker=true" title="Run with docker"> <button type="button" class="btn btn-primary btn-lg"> Docker </button></a>  
|
| 57 |
<a target="_blank" href="https://huggingface.co/spaces/MeYourHint/MoMask?duplicate=true" title="Duplicate space with private gpu and no queue"> <button type="button" class="btn btn-primary btn-lg"> Duplicate </button></a>  
|
| 58 |
-
<img src=https://img.shields.io/badge/Visit-{Total_Calls}-green>
|
| 59 |
</h3>
|
| 60 |
<h3> Description </h3>
|
| 61 |
<p>
|
|
@@ -65,7 +63,7 @@ WEBSITE = f"""
|
|
| 65 |
πππ In addition, we provide a link to download the generated human skeletal motion in <b>BVH</b> file format, compatible with CG software such as Blender!!! πππ
|
| 66 |
</p>
|
| 67 |
<p>
|
| 68 |
-
πππ If you find this demo interesting, we would appreciate your star <a href="https://github.com/EricGuo5513/momask-codes" target="_blank"
|
| 69 |
</p>
|
| 70 |
<p>
|
| 71 |
If you have any issues on this space or feature requests, we warmly welcome you to contact us through our <a href="https://github.com/EricGuo5513/momask-codes/issues" target="_blank">github repo</a> or <a href="mailto:ymu3@ualberta.ca?subject =[MoMask]Feedback&body = Message">email</a>.
|
|
@@ -73,6 +71,7 @@ If you have any issues on this space or feature requests, we warmly welcome you
|
|
| 73 |
</div>
|
| 74 |
"""
|
| 75 |
WEBSITE_bottom = """
|
|
|
|
| 76 |
<p>
|
| 77 |
We thanks <a href="https://huggingface.co/spaces/Mathux/TMR" target="_blank">TMR</a> for this cool space template.
|
| 78 |
</p>
|
|
@@ -129,11 +128,12 @@ if not os.path.exists("/data/stats"):
|
|
| 129 |
with open("/data/stats/Prompts.text", 'w') as f:
|
| 130 |
pass
|
| 131 |
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
|
|
|
| 137 |
|
| 138 |
### Load Stats ###
|
| 139 |
|
|
@@ -204,7 +204,7 @@ def generate(
|
|
| 204 |
print(text)
|
| 205 |
with open("/data/stats/Prompts.text", 'a') as f:
|
| 206 |
f.write(text+'\n')
|
| 207 |
-
update_total_calls()
|
| 208 |
prompt_list = []
|
| 209 |
length_list = []
|
| 210 |
est_length = False
|
|
|
|
| 34 |
|
| 35 |
clip_version = 'ViT-B/32'
|
| 36 |
|
| 37 |
+
WEBSITE = """
|
|
|
|
| 38 |
<div class="embed_hidden">
|
| 39 |
<h1 style='text-align: center'> MoMask: Generative Masked Modeling of 3D Human Motions </h1>
|
| 40 |
<h2 style='text-align: center'>
|
|
|
|
| 54 |
<a target="_blank" href="https://ericguo5513.github.io/source_files/momask_2023_bib.txt"> <button type="button" class="btn btn-primary btn-lg"> BibTex </button></a>  
|
| 55 |
<a target="_blank" href="https://huggingface.co/spaces/MeYourHint/MoMask?docker=true" title="Run with docker"> <button type="button" class="btn btn-primary btn-lg"> Docker </button></a>  
|
| 56 |
<a target="_blank" href="https://huggingface.co/spaces/MeYourHint/MoMask?duplicate=true" title="Duplicate space with private gpu and no queue"> <button type="button" class="btn btn-primary btn-lg"> Duplicate </button></a>  
|
|
|
|
| 57 |
</h3>
|
| 58 |
<h3> Description </h3>
|
| 59 |
<p>
|
|
|
|
| 63 |
πππ In addition, we provide a link to download the generated human skeletal motion in <b>BVH</b> file format, compatible with CG software such as Blender!!! πππ
|
| 64 |
</p>
|
| 65 |
<p>
|
| 66 |
+
πππ If you find this demo interesting, we would appreciate your star on our <a href="https://github.com/EricGuo5513/momask-codes" target="_blank">github repo</a>. More details could be found on our <a href='https://ericguo5513.github.io/momask/' target='_blank'>webpage</a>. π«Άπ«Άπ«Ά
|
| 67 |
</p>
|
| 68 |
<p>
|
| 69 |
If you have any issues on this space or feature requests, we warmly welcome you to contact us through our <a href="https://github.com/EricGuo5513/momask-codes/issues" target="_blank">github repo</a> or <a href="mailto:ymu3@ualberta.ca?subject =[MoMask]Feedback&body = Message">email</a>.
|
|
|
|
| 71 |
</div>
|
| 72 |
"""
|
| 73 |
WEBSITE_bottom = """
|
| 74 |
+
<div class="embed_hidden">
|
| 75 |
<p>
|
| 76 |
We thanks <a href="https://huggingface.co/spaces/Mathux/TMR" target="_blank">TMR</a> for this cool space template.
|
| 77 |
</p>
|
|
|
|
| 128 |
with open("/data/stats/Prompts.text", 'w') as f:
|
| 129 |
pass
|
| 130 |
|
| 131 |
+
# Total_Calls = 7792
|
| 132 |
+
# def update_total_calls():
|
| 133 |
+
# global Total_Calls
|
| 134 |
+
# Total_Calls_offset = 7792 ## init number from visit, 01/07
|
| 135 |
+
# with open("/data/stats/Prompts.text", 'r') as f:
|
| 136 |
+
# Total_Calls = len(f.readlines()) + Total_Calls_offset
|
| 137 |
|
| 138 |
### Load Stats ###
|
| 139 |
|
|
|
|
| 204 |
print(text)
|
| 205 |
with open("/data/stats/Prompts.text", 'a') as f:
|
| 206 |
f.write(text+'\n')
|
| 207 |
+
# update_total_calls()
|
| 208 |
prompt_list = []
|
| 209 |
length_list = []
|
| 210 |
est_length = False
|