Q-bert commited on
Commit
731e76c
1 Parent(s): 72b5c5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,7 +49,7 @@ def check_existing_model(stock_symbol, start_date, end_date):
49
  state = repo_id in [model.modelId for model in hf_api.list_models()]
50
  return state
51
 
52
- @spaces.GPU(duration=300)
53
  def train_stock_model(stock_symbol, start_date, end_date, feature_range=(10, 100), data_seq_length=256, epochs=10, batch_size=16, learning_rate=2e-4):
54
  repo_id = f"Q-bert/StockLlama-tuned{stock_symbol}-{start_date}_{end_date}"
55
 
@@ -124,7 +124,7 @@ def train_stock_model(stock_symbol, start_date, end_date, feature_range=(10, 100
124
  )
125
  return f"Training completed and model saved for {stock_symbol} from {start_date} to {end_date}."
126
 
127
- @spaces.GPU(duration=300)
128
  def gradio_train_stock_model(stock_symbol, start_date, end_date, feature_range_min, feature_range_max, data_seq_length, epochs, batch_size, learning_rate):
129
  feature_range = (feature_range_min, feature_range_max)
130
  result = train_stock_model(
 
49
  state = repo_id in [model.modelId for model in hf_api.list_models()]
50
  return state
51
 
52
+ @spaces.GPU(duration=120)
53
  def train_stock_model(stock_symbol, start_date, end_date, feature_range=(10, 100), data_seq_length=256, epochs=10, batch_size=16, learning_rate=2e-4):
54
  repo_id = f"Q-bert/StockLlama-tuned{stock_symbol}-{start_date}_{end_date}"
55
 
 
124
  )
125
  return f"Training completed and model saved for {stock_symbol} from {start_date} to {end_date}."
126
 
127
+ @spaces.GPU(duration=120)
128
  def gradio_train_stock_model(stock_symbol, start_date, end_date, feature_range_min, feature_range_max, data_seq_length, epochs, batch_size, learning_rate):
129
  feature_range = (feature_range_min, feature_range_max)
130
  result = train_stock_model(