Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -181,10 +181,14 @@ def main():
|
|
| 181 |
|
| 182 |
# Connect the button to the processing function
|
| 183 |
submit_btn.click(
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
# Launch the application
|
| 190 |
demo.launch()
|
|
|
|
| 181 |
|
| 182 |
# Connect the button to the processing function
|
| 183 |
submit_btn.click(
|
| 184 |
+
fn=lambda: "Reading in progress...", # Show progress message
|
| 185 |
+
inputs=None,
|
| 186 |
+
outputs=output
|
| 187 |
+
).then(
|
| 188 |
+
fn=process_tarot, # Run the tarot reading
|
| 189 |
+
inputs=[question, reason_img, result_img, recommendation_img], # Pass all inputs
|
| 190 |
+
outputs=output # Update the same output with the result
|
| 191 |
+
)
|
| 192 |
|
| 193 |
# Launch the application
|
| 194 |
demo.launch()
|