Spaces:
Running
Running
Commit
·
f0b3275
1
Parent(s):
6ae8941
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
|
4 |
+
url = os.environ['IP_ADDRESS']
|
5 |
+
|
6 |
+
with gr.Blocks(css = ".output-image, .input-image, .image-preview {height: 400px !important} ") as demo:
|
7 |
+
gr.HTML(
|
8 |
+
"""
|
9 |
+
|
10 |
+
<!DOCTYPE html>
|
11 |
+
<html lang="zh">
|
12 |
+
<head>
|
13 |
+
<meta charset="UTF-8">
|
14 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
15 |
+
<title>Make-A-Character</title>
|
16 |
+
<style>
|
17 |
+
body {font-family: Arial, sans-serif;
|
18 |
+
text-align: center;
|
19 |
+
}
|
20 |
+
|
21 |
+
header, section, footer {
|
22 |
+
margin-bottom: 10px;
|
23 |
+
}
|
24 |
+
iframe {
|
25 |
+
width: 80%;
|
26 |
+
height: 900px;
|
27 |
+
align-items: center;
|
28 |
+
border: none;
|
29 |
+
}
|
30 |
+
</style>
|
31 |
+
</head>
|
32 |
+
<body>
|
33 |
+
<header>
|
34 |
+
<h1>Make-A-Character</h1>
|
35 |
+
</header>
|
36 |
+
<ul>
|
37 |
+
<strong>Github:</strong> <a href="https://github.com/Human3DAIGC/Make-A-Character">https://github.com/Human3DAIGC/Make-A-Character</a>
|
38 |
+
</ul>
|
39 |
+
<section>
|
40 |
+
<b>If you like our project, please give us a ★ on Github to stay updated with the latest developments.</b>
|
41 |
+
<iframe src=""" + url + """ title="demo"></iframe>
|
42 |
+
</section>
|
43 |
+
</body>
|
44 |
+
</html>""")
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
if __name__ == "__main__":
|
49 |
+
demo.queue( concurrency_count=15)
|
50 |
+
demo.launch()
|
51 |
+
|