Spaces:
Build error
Build error
Kaushik Rajan
commited on
Commit
·
db6e385
1
Parent(s):
8832bfe
Fix: Add @spaces.GPU decorator to resolve runtime error
Browse files
app.py
CHANGED
|
@@ -12,6 +12,7 @@ import gradio as gr
|
|
| 12 |
import numpy as np
|
| 13 |
import pandas as pd
|
| 14 |
import plotly.express as px
|
|
|
|
| 15 |
|
| 16 |
# --- Game Configuration ---
|
| 17 |
INITIAL_BUDGET = 1000
|
|
@@ -234,6 +235,7 @@ def create_interface():
|
|
| 234 |
|
| 235 |
return fig_ms, fig_b, fig_q
|
| 236 |
|
|
|
|
| 237 |
def game_step_and_update(env, rd, mkt, sales):
|
| 238 |
player_budget = env.player_stats["budget"]
|
| 239 |
if (rd + mkt + sales) > player_budget:
|
|
|
|
| 12 |
import numpy as np
|
| 13 |
import pandas as pd
|
| 14 |
import plotly.express as px
|
| 15 |
+
import spaces
|
| 16 |
|
| 17 |
# --- Game Configuration ---
|
| 18 |
INITIAL_BUDGET = 1000
|
|
|
|
| 235 |
|
| 236 |
return fig_ms, fig_b, fig_q
|
| 237 |
|
| 238 |
+
@spaces.GPU
|
| 239 |
def game_step_and_update(env, rd, mkt, sales):
|
| 240 |
player_budget = env.player_stats["budget"]
|
| 241 |
if (rd + mkt + sales) > player_budget:
|