Spaces:
Sleeping
Sleeping
add variables initialization method
Browse files
README.md
CHANGED
@@ -9,4 +9,6 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
short_description: A self-healing ChatBot to comfort yourself.
|
11 |
header: mini
|
|
|
|
|
12 |
---
|
|
|
9 |
pinned: false
|
10 |
short_description: A self-healing ChatBot to comfort yourself.
|
11 |
header: mini
|
12 |
+
models:
|
13 |
+
- stabilityai/stable-diffusion-xl-base-1.0
|
14 |
---
|
app.py
CHANGED
@@ -353,5 +353,15 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
353 |
# generate other images event handle
|
354 |
gen_other_img.click(generate_images, [chatbot], image_outputs)
|
355 |
|
356 |
-
|
357 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
# generate other images event handle
|
354 |
gen_other_img.click(generate_images, [chatbot], image_outputs)
|
355 |
|
356 |
+
if __name__ == "__main__":
|
357 |
+
# initialize the variables
|
358 |
+
torch.cuda.empty_cache()
|
359 |
+
generated_images = None
|
360 |
+
meditation_flag = True
|
361 |
+
last_genimg_times = 0
|
362 |
+
conversation_times = 0
|
363 |
+
valence_scores = []
|
364 |
+
arousal_scores = []
|
365 |
+
|
366 |
+
demo.queue(max_size=20)
|
367 |
+
demo.launch(show_api=False)
|