sandz7 commited on
Commit
00f5f00
Β·
1 Parent(s): ed4bcb0

debugging to get the space info

Browse files
Files changed (1) hide show
  1. app.py +16 -14
app.py CHANGED
@@ -22,20 +22,21 @@ def space_hardware_config(instance_size: str="gpu",
22
  """
23
 
24
  # Get Space
25
- space = api.get_repo(space_id)
26
-
27
- # Hardware Configuration
28
- space.config["compute"] = {
29
- "instance_type": instance_type,
30
- "instance_size": instance_size,
31
- "disk_size": 50,
32
- "vcpus": vcpus, # number of virtual CPU's
33
- "memory": memory # amount of memory in gb
34
- }
35
-
36
- # Save updated space config
37
- api.push_to_hub(space)
38
- print("Hardware configuration successfull. Check the cuda command.")
 
39
 
40
  # Automatically place to the standard config we need for loki
41
  space_hardware_config()
@@ -331,4 +332,5 @@ with gr.Blocks(fill_height=True) as demo:
331
  )
332
 
333
  if __name__ == "__main__":
 
334
  demo.launch()
 
22
  """
23
 
24
  # Get Space
25
+ space_info = api.repo_info(repo_id=space_id)
26
+ print(space_info)
27
+
28
+ # # Hardware Configuration
29
+ # space.config["compute"] = {
30
+ # "instance_type": instance_type,
31
+ # "instance_size": instance_size,
32
+ # "disk_size": 50,
33
+ # "vcpus": vcpus, # number of virtual CPU's
34
+ # "memory": memory # amount of memory in gb
35
+ # }
36
+
37
+ # # Save updated space config
38
+ # api.push_to_hub(space)
39
+ # print("Hardware configuration successfull. Check the cuda command.")
40
 
41
  # Automatically place to the standard config we need for loki
42
  space_hardware_config()
 
332
  )
333
 
334
  if __name__ == "__main__":
335
+ space_hardware_config()
336
  demo.launch()