Spaces:
Running
Running
ChenyuRabbitLove
commited on
Commit
•
474db4e
1
Parent(s):
7d68f93
bugfix: fix minor bugs
Browse files- app.py +0 -2
- utils/completion_reward.py +10 -10
app.py
CHANGED
@@ -67,11 +67,9 @@ def get_player_logs(player_backend_user_id):
|
|
67 |
f"Player {player_backend_user_id} not found in processed_player_adventure_logs.json"
|
68 |
)
|
69 |
|
70 |
-
|
71 |
def init_reward():
|
72 |
return CompletionReward()
|
73 |
|
74 |
-
|
75 |
# start of gradio interface
|
76 |
with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
|
77 |
player_info = gr.State()
|
|
|
67 |
f"Player {player_backend_user_id} not found in processed_player_adventure_logs.json"
|
68 |
)
|
69 |
|
|
|
70 |
def init_reward():
|
71 |
return CompletionReward()
|
72 |
|
|
|
73 |
# start of gradio interface
|
74 |
with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
|
75 |
player_info = gr.State()
|
utils/completion_reward.py
CHANGED
@@ -47,16 +47,16 @@ class CompletionReward:
|
|
47 |
"google": self.paragraph_google,
|
48 |
"mtk": self.paragraph_mtk,
|
49 |
}
|
50 |
-
SERVICE_ACCOUNT_INFO = os.getenv("GBQ_TOKEN")
|
51 |
-
service_account_info_dict = json.loads(SERVICE_ACCOUNT_INFO)
|
52 |
-
|
53 |
-
creds = Credentials.from_service_account_info(service_account_info_dict)
|
54 |
-
self.gbq_client = bigquery.Client(
|
55 |
-
|
56 |
-
)
|
57 |
-
self.gcs_client = storage.Client(
|
58 |
-
|
59 |
-
)
|
60 |
|
61 |
def get_llm_response(self, player_logs):
|
62 |
agents_responses = {
|
|
|
47 |
"google": self.paragraph_google,
|
48 |
"mtk": self.paragraph_mtk,
|
49 |
}
|
50 |
+
# SERVICE_ACCOUNT_INFO = os.getenv("GBQ_TOKEN")
|
51 |
+
# service_account_info_dict = json.loads(SERVICE_ACCOUNT_INFO)
|
52 |
+
|
53 |
+
# creds = Credentials.from_service_account_info(service_account_info_dict)
|
54 |
+
# self.gbq_client = bigquery.Client(
|
55 |
+
# credentials=creds, project=service_account_info_dict["project_id"]
|
56 |
+
# )
|
57 |
+
# self.gcs_client = storage.Client(
|
58 |
+
# credentials=creds, project=service_account_info_dict["project_id"]
|
59 |
+
# )
|
60 |
|
61 |
def get_llm_response(self, player_logs):
|
62 |
agents_responses = {
|