Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ from huggingface_hub import HfApi
|
|
11 |
from huggingface_hub import upload_file
|
12 |
import tempfile
|
13 |
from dotenv import load_dotenv
|
|
|
14 |
|
15 |
# Use dotenv to load the environment variables
|
16 |
load_dotenv()
|
@@ -41,6 +42,7 @@ def clean_emissions_data(emissions_data):
|
|
41 |
fields_to_remove = ['timestamp', 'project_name', 'experiment_id', 'latitude', 'longitude']
|
42 |
return {k: v for k, v in data_dict.items() if k not in fields_to_remove}
|
43 |
|
|
|
44 |
def evaluate():
|
45 |
# Get space info
|
46 |
username, space_url = get_space_info()
|
|
|
11 |
from huggingface_hub import upload_file
|
12 |
import tempfile
|
13 |
from dotenv import load_dotenv
|
14 |
+
import spaces
|
15 |
|
16 |
# Use dotenv to load the environment variables
|
17 |
load_dotenv()
|
|
|
42 |
fields_to_remove = ['timestamp', 'project_name', 'experiment_id', 'latitude', 'longitude']
|
43 |
return {k: v for k, v in data_dict.items() if k not in fields_to_remove}
|
44 |
|
45 |
+
@spaces.GPU
|
46 |
def evaluate():
|
47 |
# Get space info
|
48 |
username, space_url = get_space_info()
|