Update app.py
Browse files
app.py
CHANGED
@@ -36,6 +36,8 @@ summarizer = pipeline("summarization")
|
|
36 |
|
37 |
#######################################################
|
38 |
|
|
|
|
|
39 |
def break_until_dot(txt):
|
40 |
return txt.rsplit('.', 1)[0] + '.'
|
41 |
|
@@ -65,11 +67,11 @@ def on_change_event(app_state):
|
|
65 |
if app_state and app_state['running'] and app_state['img']:
|
66 |
img = app_state['img']
|
67 |
step = app_state['step']
|
68 |
-
label = f'Reconstructed image from the latent state at step {step}'
|
69 |
print(f'Updating the image:! {app_state}')
|
70 |
return gr.update(value=img, label=label)
|
71 |
else:
|
72 |
-
return gr.update()
|
73 |
|
74 |
with gr.Blocks() as demo:
|
75 |
|
|
|
36 |
|
37 |
#######################################################
|
38 |
|
39 |
+
#######################################################
|
40 |
+
|
41 |
def break_until_dot(txt):
|
42 |
return txt.rsplit('.', 1)[0] + '.'
|
43 |
|
|
|
67 |
if app_state and app_state['running'] and app_state['img']:
|
68 |
img = app_state['img']
|
69 |
step = app_state['step']
|
70 |
+
label = f'Reconstructed image from the latent state at step {step}. It will get better :)'
|
71 |
print(f'Updating the image:! {app_state}')
|
72 |
return gr.update(value=img, label=label)
|
73 |
else:
|
74 |
+
return gr.update(label='Illustration will appear here soon')
|
75 |
|
76 |
with gr.Blocks() as demo:
|
77 |
|