Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from codecarbon import EmissionsTracker
|
3 |
|
4 |
# Import necessary libraries
|
@@ -25,6 +26,7 @@ def create_sample_data():
|
|
25 |
X, y = create_sample_data()
|
26 |
tracker = EmissionsTracker()
|
27 |
|
|
|
28 |
def submit(username):
|
29 |
|
30 |
tracker.start()
|
|
|
1 |
import gradio as gr
|
2 |
+
import spaces
|
3 |
from codecarbon import EmissionsTracker
|
4 |
|
5 |
# Import necessary libraries
|
|
|
26 |
X, y = create_sample_data()
|
27 |
tracker = EmissionsTracker()
|
28 |
|
29 |
+
@spaces.GPU
|
30 |
def submit(username):
|
31 |
|
32 |
tracker.start()
|