zeel sheladiya commited on
Commit
03ecc94
·
1 Parent(s): a1b4f7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -9
app.py CHANGED
@@ -9,7 +9,17 @@ away_team_id = sorted(data["away_team_long_name"].unique())
9
 
10
 
11
  def predict(*args):
12
- pass
 
 
 
 
 
 
 
 
 
 
13
 
14
  # markup table for markdown
15
  # # Members:
@@ -52,15 +62,17 @@ with gr.Blocks() as demo:
52
 
53
  with gr.Row():
54
  predict_btn = gr.Button(value="Predict")
55
- predict_btn.click(
56
- predict,
57
- inputs=[
58
- # needed parameters
59
- ],
60
- outputs=[],
61
- )
62
 
63
  with gr.Row():
64
- plot = gr.Plot()
 
 
 
 
 
 
 
 
 
65
 
66
  demo.launch()
 
9
 
10
 
11
  def predict(*args):
12
+ # TODO: need to complete the function
13
+ # if str(home_team_id.value) == None:
14
+ # print(str(home_team_id.value))
15
+ # raise gr.Error("Home Team is required")
16
+
17
+ # if str(Away_team_id.value) == None:
18
+ # raise gr.Error("Away Team is required")
19
+
20
+ # print(str(home_team_id.value))
21
+ # return str(home_team_id.value)
22
+ return "None"
23
 
24
  # markup table for markdown
25
  # # Members:
 
62
 
63
  with gr.Row():
64
  predict_btn = gr.Button(value="Predict")
 
 
 
 
 
 
 
65
 
66
  with gr.Row():
67
+ Answer = gr.Label("👋 Hello, Let us predict the Football Match 💁‍♂️", container=False)
68
+
69
+ predict_btn.click(
70
+ predict,
71
+ inputs=[
72
+ home_team_id,
73
+ Away_team_id,
74
+ ],
75
+ outputs=[Answer],
76
+ )
77
 
78
  demo.launch()