DigiP-AI commited on
Commit
65cb2fc
·
verified ·
1 Parent(s): b2d5428

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -61
app.py CHANGED
@@ -2,65 +2,22 @@ import gradio as gr
2
  import requests
3
  import json
4
 
5
- <!DOCTYPE html>
6
- <html>
7
 
8
- <head>
9
- <meta charset="utf-8" />
10
- <meta name="viewport" content="width=device-width" />
11
- <title>Realistic Image Generator Model</title>
12
- <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
13
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
14
- <style>
15
- body {
16
- margin: 0;
17
- font-family: 'Poppins', sans-serif;
18
- }
19
- .fullframe {
20
- max-width: 100%;
21
- max-height: 100%;
22
-
23
- overflow: hidden;
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)