omerXfaruq commited on
Commit
311fc61
1 Parent(s): bf5fb31

-fix a typo

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -106,11 +106,13 @@ class SpaceBuilder:
106
  if not np.all(
107
  interface_input_types == first_input_types
108
  ): # Vectorize the comparison and don't use double for loop
 
109
  return False
110
  interface_output_types = [
111
  type(output) for output in interface.output_components
112
  ]
113
  if not np.all(interface_output_types == first_output_types):
 
114
  return False
115
 
116
  return True
@@ -137,7 +139,7 @@ class SpaceBuilder:
137
  cls.error_message = "The the username/space_name is already used for the given token's user"
138
  return False
139
  else:
140
- return False
141
 
142
  @staticmethod
143
  def build_space(space_names: str, hf_token: str, target_space_name: str, space_description: str) -> str:
 
106
  if not np.all(
107
  interface_input_types == first_input_types
108
  ): # Vectorize the comparison and don't use double for loop
109
+ cls.error_message = "Given spaces's input types are different"
110
  return False
111
  interface_output_types = [
112
  type(output) for output in interface.output_components
113
  ]
114
  if not np.all(interface_output_types == first_output_types):
115
+ cls.error_message = "Given spaces's input types are different"
116
  return False
117
 
118
  return True
 
139
  cls.error_message = "The the username/space_name is already used for the given token's user"
140
  return False
141
  else:
142
+ return True
143
 
144
  @staticmethod
145
  def build_space(space_names: str, hf_token: str, target_space_name: str, space_description: str) -> str: