Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import yfinance as yf
|
| 3 |
import pandas as pd
|
|
@@ -79,9 +80,9 @@ def signup_user(username, password):
|
|
| 79 |
return "Signup Successful! You can now log in."
|
| 80 |
|
| 81 |
# Gradio Interface
|
| 82 |
-
with gr.Blocks(css=".gradio-container {background-color: #f5f5f5; padding: 20px;}") as
|
| 83 |
-
#
|
| 84 |
-
with gr.Blocks() as
|
| 85 |
gr.Image("/mnt/data/wolf-logo-vector-27048037.jpg", elem_id="welcome-img", label="Logo")
|
| 86 |
gr.Markdown("""
|
| 87 |
# Welcome to Stock Anomaly Detection
|
|
@@ -130,15 +131,11 @@ with gr.Blocks(css=".gradio-container {background-color: #f5f5f5; padding: 20px;
|
|
| 130 |
</div>
|
| 131 |
""")
|
| 132 |
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
}
|
| 142 |
-
""")
|
| 143 |
-
|
| 144 |
-
demo.launch(share=True)
|
|
|
|
| 1 |
+
import time
|
| 2 |
import gradio as gr
|
| 3 |
import yfinance as yf
|
| 4 |
import pandas as pd
|
|
|
|
| 80 |
return "Signup Successful! You can now log in."
|
| 81 |
|
| 82 |
# Gradio Interface
|
| 83 |
+
with gr.Blocks(css=".gradio-container {background-color: #f5f5f5; padding: 20px;}") as app:
|
| 84 |
+
# Splash Screen
|
| 85 |
+
with gr.Blocks() as splash_screen:
|
| 86 |
gr.Image("/mnt/data/wolf-logo-vector-27048037.jpg", elem_id="welcome-img", label="Logo")
|
| 87 |
gr.Markdown("""
|
| 88 |
# Welcome to Stock Anomaly Detection
|
|
|
|
| 131 |
</div>
|
| 132 |
""")
|
| 133 |
|
| 134 |
+
# Custom function to handle splash screen timeout
|
| 135 |
+
def splash_timeout():
|
| 136 |
+
time.sleep(2) # Display splash screen for 2 seconds
|
| 137 |
+
return gr.update(visible=False), gr.update(visible=True)
|
| 138 |
+
|
| 139 |
+
splash_screen.load(splash_timeout, inputs=None, outputs=[splash_screen, main_app])
|
| 140 |
+
|
| 141 |
+
app.launch(share=True)
|
|
|
|
|
|
|
|
|
|
|
|