Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,27 @@
|
|
1 |
import gradio as gr
|
2 |
-
from gradio_client import Client
|
3 |
|
4 |
-
def text_to_image(client, prompt):
|
5 |
-
|
6 |
-
|
7 |
|
8 |
|
9 |
-
def set_client_for_session(request: gr.Request):
|
10 |
-
|
11 |
|
12 |
-
|
13 |
-
|
14 |
|
15 |
-
with gr.Blocks() as demo:
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
# from gradio_client import Client
|
3 |
|
4 |
+
# def text_to_image(client, prompt):
|
5 |
+
# img = client.predict(prompt, "", "", "", api_name="/run")
|
6 |
+
# return img
|
7 |
|
8 |
|
9 |
+
# def set_client_for_session(request: gr.Request):
|
10 |
+
# x_ip_token = request.headers['x-ip-token']
|
11 |
|
12 |
+
# # The "gradio/text-to-image" space is a ZeroGPU space
|
13 |
+
# return Client("hysts/SDXL", headers={"x-ip-token": x_ip_token})
|
14 |
|
15 |
+
# with gr.Blocks() as demo:
|
16 |
+
# client = gr.State()
|
17 |
+
# image = gr.Image()
|
18 |
+
# prompt = gr.Textbox(max_lines=1)
|
19 |
|
20 |
+
# prompt.submit(text_to_image, [client, prompt], [image])
|
21 |
|
22 |
+
# demo.load(set_client_for_session, None, client)
|
23 |
+
# demo.launch()
|
24 |
+
|
25 |
+
|
26 |
+
demo = gr.load("hysts/SDXL")
|
27 |
+
demo.launch()
|