YDluffy commited on
Commit
28e1c65
·
verified ·
1 Parent(s): bea1fc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import hf_hub_download
4
  import xgboost as xgb
5
  import numpy as np
6
 
7
- # 下载并加载模型
8
  model_path = hf_hub_download(repo_id="YDluffy/lottery_prediction", filename="lottery_xgboost_model.json")
9
  model = xgb.XGBRegressor()
10
  model.load_model(model_path)
@@ -15,7 +15,7 @@ def predict_lottery(year, period, num1, num2, num3, num4, num5, num6, special):
15
  prediction = model.predict(features)
16
  return prediction
17
 
18
- # 创建 Gradio 界面
19
  iface = gr.Interface(
20
  fn=predict_lottery,
21
  inputs=[
 
4
  import xgboost as xgb
5
  import numpy as np
6
 
7
+ # 从 Hugging Face 下载模型
8
  model_path = hf_hub_download(repo_id="YDluffy/lottery_prediction", filename="lottery_xgboost_model.json")
9
  model = xgb.XGBRegressor()
10
  model.load_model(model_path)
 
15
  prediction = model.predict(features)
16
  return prediction
17
 
18
+ # 创建 Gradio Web 界面
19
  iface = gr.Interface(
20
  fn=predict_lottery,
21
  inputs=[