Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,65 +2,22 @@ import gradio as gr
|
|
2 |
import requests
|
3 |
import json
|
4 |
|
5 |
-
|
6 |
-
<html>
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
.iframe-element {
|
26 |
-
min-width: 100%;
|
27 |
-
min-height: 100%;
|
28 |
-
}
|
29 |
-
.floating-button {
|
30 |
-
position: fixed;
|
31 |
-
bottom: 30px;
|
32 |
-
left: 20px;
|
33 |
-
background-color: #dbdad7;
|
34 |
-
color: black;
|
35 |
-
padding: 15px 25px;
|
36 |
-
border: none;
|
37 |
-
border-radius: 10px;
|
38 |
-
font-size: 13px;
|
39 |
-
font-weight: bold;
|
40 |
-
cursor: pointer;
|
41 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
42 |
-
transition: background-color 0.3s, box-shadow 0.3s;
|
43 |
-
text-decoration: none;
|
44 |
-
font-family: 'Poppins', sans-serif;
|
45 |
-
display: flex;
|
46 |
-
align-items: center;
|
47 |
-
justify-content: center;
|
48 |
-
}
|
49 |
-
.floating-button:hover {
|
50 |
-
background-color: #dbdad7;
|
51 |
-
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
|
52 |
-
}
|
53 |
-
.floating-button i {
|
54 |
-
margin-right: 10px;
|
55 |
-
}
|
56 |
-
</style>
|
57 |
-
</head>
|
58 |
-
|
59 |
-
<body>
|
60 |
-
<div class="fullframe">
|
61 |
-
<iframe class="iframe-element" allowfullscreen="true" frameborder="0" src="https://artificialguybr-realvisxl-free-demo.hf.space">
|
62 |
-
</iframe>
|
63 |
-
</div>
|
64 |
-
</body>
|
65 |
-
|
66 |
-
</html>
|
|
|
2 |
import requests
|
3 |
import json
|
4 |
|
5 |
+
from gradio_client import Client
|
|
|
6 |
|
7 |
+
client = Client("artificialguybr/RealVisXL-Free-DEMO")
|
8 |
+
result = client.predict(
|
9 |
+
prompt="Hello!!",
|
10 |
+
negative_prompt="",
|
11 |
+
seed=0,
|
12 |
+
custom_width=1024,
|
13 |
+
custom_height=1024,
|
14 |
+
guidance_scale=7,
|
15 |
+
num_inference_steps=28,
|
16 |
+
sampler="DPM++ 2M SDE Karras",
|
17 |
+
aspect_ratio_selector="1024 x 1024",
|
18 |
+
use_upscaler=False,
|
19 |
+
upscaler_strength=0.55,
|
20 |
+
upscale_by=1.5,
|
21 |
+
api_name="/run"
|
22 |
+
)
|
23 |
+
print(result)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|