laxsvips commited on
Commit
7b7bfaf
·
1 Parent(s): bb2e116

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -3,7 +3,7 @@ from chat import start_game
3
  import gradio
4
 
5
  def initialize_game(game_id, user_id):
6
- result = chat.initialize_game(user_id, game_id)
7
  response = {'role': 'assistant', 'content': result}
8
  return response
9
 
@@ -26,13 +26,13 @@ health_check_gr = gradio.Interface(
26
  fn=health_check,
27
  inputs="text",
28
  outputs="text",
29
- title="Health Check for Genesis APIs",
30
  description="An API to check if the API is working"
31
  )
32
 
33
  initialize_game_gr = gradio.Interface(
34
  fn=initialize_game,
35
- inputs=["text","text"],
36
  outputs="text",
37
  title="Initialize Game",
38
  description="An API to initialize the game. This is executed ONLY when a user starts a game"
@@ -46,5 +46,5 @@ play_game_gr = gradio.Interface(
46
  description="An API for the user to interact with the LLM"
47
  )
48
 
49
- genesis_app = gradio.TabbedInterface([health_check_gr, initialize_game_gr, play_game_gr], ["Health Check", "Initialize game", "Play Game"])
50
  genesis_app.launch()
 
3
  import gradio
4
 
5
  def initialize_game(game_id, user_id):
6
+ result = chat.initialize_game(game_id, user_id, user_input)
7
  response = {'role': 'assistant', 'content': result}
8
  return response
9
 
 
26
  fn=health_check,
27
  inputs="text",
28
  outputs="text",
29
+ title="DEVELOPERS ONLY - Health Check for Genesis APIs",
30
  description="An API to check if the API is working"
31
  )
32
 
33
  initialize_game_gr = gradio.Interface(
34
  fn=initialize_game,
35
+ inputs=["text","text", "text"],
36
  outputs="text",
37
  title="Initialize Game",
38
  description="An API to initialize the game. This is executed ONLY when a user starts a game"
 
46
  description="An API for the user to interact with the LLM"
47
  )
48
 
49
+ genesis_app = gradio.TabbedInterface([health_check_gr, initialize_game_gr, play_game_gr], ["Developers - Health Check", "Initialize game", "Play Game"])
50
  genesis_app.launch()