Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import spaces #0.32.0
|
|
4 |
import torch
|
5 |
import os
|
6 |
import platform
|
|
|
7 |
|
8 |
model = ""
|
9 |
duration = 5
|
@@ -101,5 +102,14 @@ demo = gr.ChatInterface(
|
|
101 |
)
|
102 |
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
if __name__ == "__main__":
|
105 |
demo.launch()
|
|
|
4 |
import torch
|
5 |
import os
|
6 |
import platform
|
7 |
+
import requests
|
8 |
|
9 |
model = ""
|
10 |
duration = 5
|
|
|
102 |
)
|
103 |
|
104 |
|
105 |
+
response = requests.get("https://api.huggingface.co/account", headers=headers)
|
106 |
+
|
107 |
+
if response.status_code == 200:
|
108 |
+
account_info = response.json()
|
109 |
+
compute_time_remaining = account_info["compute_time_remaining"]
|
110 |
+
print(f"Compute time remaining: {compute_time_remaining} seconds")
|
111 |
+
else:
|
112 |
+
print("Error:", response.status_code)
|
113 |
+
|
114 |
if __name__ == "__main__":
|
115 |
demo.launch()
|