ksort commited on
Commit
21d48a0
·
1 Parent(s): 77536f4
model/matchmaker.py CHANGED
@@ -81,6 +81,9 @@ def matchmaker(num_players, k_group=4):
81
 
82
  ratings, comparison_counts, total_comparisons = load_json_via_sftp()
83
 
 
 
 
84
  # Randomly select a player
85
  # selected_player = np.random.randint(0, num_players)
86
  selected_player = np.argmin(comparison_counts.sum(axis=1))
 
81
 
82
  ratings, comparison_counts, total_comparisons = load_json_via_sftp()
83
 
84
+ ratings = ratings[:num_players]
85
+ comparison_counts = comparison_counts[:num_players, :num_players]
86
+
87
  # Randomly select a player
88
  # selected_player = np.random.randint(0, num_players)
89
  selected_player = np.argmin(comparison_counts.sum(axis=1))
model/models/other_api_models.py CHANGED
@@ -9,7 +9,8 @@ class OtherModel():
9
  self.model_name = model_name
10
  self.model_type = model_type
11
  self.url = "https://www.xdai.online/mj/submit/imagine"
12
- self.key = os.environ.get('MIDJOURNEY_KEY')
 
13
  self.get_url = "https://www.xdai.online/mj/image/"
14
  self.repeat_num = 5
15
 
 
9
  self.model_name = model_name
10
  self.model_type = model_type
11
  self.url = "https://www.xdai.online/mj/submit/imagine"
12
+ # self.key = os.environ.get('MIDJOURNEY_KEY')
13
+ self.key = 'sk-yhIAe209CeWmk7ueC5D673A2D6164eE5919656Ea989913Fb'
14
  self.get_url = "https://www.xdai.online/mj/image/"
15
  self.repeat_num = 5
16