Spaces:
Paused
Paused
Tonic commited on
fix gradio display issue
Browse files
app.py
CHANGED
|
@@ -1036,7 +1036,7 @@ def make_prediction_enhanced(symbol: str, timeframe: str = "1d", prediction_days
|
|
| 1036 |
pipe = load_pipeline()
|
| 1037 |
|
| 1038 |
# Get the model's device and dtype
|
| 1039 |
-
device = torch.device("cuda:0") # Force CUDA device
|
| 1040 |
dtype = torch.float16 # Force float16
|
| 1041 |
print(f"Model device: {device}")
|
| 1042 |
print(f"Model dtype: {dtype}")
|
|
@@ -2642,9 +2642,15 @@ def create_interface():
|
|
| 2642 |
|
| 2643 |
# Add market status message with periodic updates
|
| 2644 |
market_status_display = gr.Markdown(
|
| 2645 |
-
value=get_market_status_display()
|
| 2646 |
-
|
| 2647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2648 |
)
|
| 2649 |
|
| 2650 |
# Add enhanced market information section
|
|
|
|
| 1036 |
pipe = load_pipeline()
|
| 1037 |
|
| 1038 |
# Get the model's device and dtype
|
| 1039 |
+
device = torch.device("cuda:0") # Force CUDA device mapping
|
| 1040 |
dtype = torch.float16 # Force float16
|
| 1041 |
print(f"Model device: {device}")
|
| 1042 |
print(f"Model dtype: {dtype}")
|
|
|
|
| 2642 |
|
| 2643 |
# Add market status message with periodic updates
|
| 2644 |
market_status_display = gr.Markdown(
|
| 2645 |
+
value=get_market_status_display()
|
| 2646 |
+
)
|
| 2647 |
+
|
| 2648 |
+
# Set up periodic updates for market status
|
| 2649 |
+
market_status_display.every(
|
| 2650 |
+
fn=update_market_status,
|
| 2651 |
+
inputs=None,
|
| 2652 |
+
outputs=market_status_display,
|
| 2653 |
+
every=600 # Update every 10 minutes (600 seconds)
|
| 2654 |
)
|
| 2655 |
|
| 2656 |
# Add enhanced market information section
|