Update app.py
Browse files
app.py
CHANGED
@@ -78,6 +78,15 @@ def gen_fn(model_str, prompt, negative_prompt):
|
|
78 |
return None
|
79 |
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
def make_me():
|
82 |
with gr.Row():
|
83 |
txt_input = gr.Textbox(lines=2, value=kii)
|
@@ -85,6 +94,11 @@ def make_me():
|
|
85 |
gen_button = gr.Button('Generate images')
|
86 |
stop_button = gr.Button('Stop', variant='secondary', interactive=False)
|
87 |
gen_button.click(lambda _: gr.update(interactive=True), None, stop_button)
|
|
|
|
|
|
|
|
|
|
|
88 |
gr.HTML("""
|
89 |
<div style="text-align: center; max-width: 100%; margin: 0 auto;">
|
90 |
<body>
|
@@ -117,18 +131,8 @@ js_code = """
|
|
117 |
</script>
|
118 |
"""
|
119 |
|
120 |
-
def log_message():
|
121 |
-
logs = ""
|
122 |
-
for i in range(5): # Simulate some logging over time
|
123 |
-
logs += f"Log message {i+1}\n"
|
124 |
-
time.sleep(1)
|
125 |
-
return logs
|
126 |
|
127 |
-
with gr.Blocks() as demo:
|
128 |
-
log_output = gr.Textbox(label="Logs", lines=10, interactive=False)
|
129 |
-
log_button = gr.Button("Start Logging")
|
130 |
|
131 |
-
log_button.click(log_message, outputs=log_output)
|
132 |
|
133 |
with gr.Blocks(css="""
|
134 |
label.float.svelte-i3tvor { top:auto!important; bottom: 0; position: absolute; background: rgba(0,0,0,0.0); left: var(--block-label-margin); color: rgba(200,200,200,.7);}
|
|
|
78 |
return None
|
79 |
|
80 |
|
81 |
+
|
82 |
+
def log_message():
|
83 |
+
logs = ""
|
84 |
+
for i in range(5): # Simulate some logging over time
|
85 |
+
logs += f"Log message {i+1}\n"
|
86 |
+
time.sleep(1)
|
87 |
+
return logs
|
88 |
+
|
89 |
+
|
90 |
def make_me():
|
91 |
with gr.Row():
|
92 |
txt_input = gr.Textbox(lines=2, value=kii)
|
|
|
94 |
gen_button = gr.Button('Generate images')
|
95 |
stop_button = gr.Button('Stop', variant='secondary', interactive=False)
|
96 |
gen_button.click(lambda _: gr.update(interactive=True), None, stop_button)
|
97 |
+
|
98 |
+
log_output = gr.Textbox(label="Logs", lines=10, interactive=False)
|
99 |
+
log_button = gr.Button("Start Logging")
|
100 |
+
log_button.click(log_message, outputs=log_output)
|
101 |
+
|
102 |
gr.HTML("""
|
103 |
<div style="text-align: center; max-width: 100%; margin: 0 auto;">
|
104 |
<body>
|
|
|
131 |
</script>
|
132 |
"""
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
|
|
|
|
|
|
|
135 |
|
|
|
136 |
|
137 |
with gr.Blocks(css="""
|
138 |
label.float.svelte-i3tvor { top:auto!important; bottom: 0; position: absolute; background: rgba(0,0,0,0.0); left: var(--block-label-margin); color: rgba(200,200,200,.7);}
|