debugging to get the space info
Browse files
app.py
CHANGED
@@ -22,20 +22,21 @@ def space_hardware_config(instance_size: str="gpu",
|
|
22 |
"""
|
23 |
|
24 |
# Get Space
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
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()
|