Spaces:
Sleeping
Sleeping
without gpu
Browse files
app.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
-
import spaces
|
3 |
-
import torch
|
4 |
import os
|
5 |
import sys
|
6 |
from pathlib import Path
|
@@ -15,13 +13,7 @@ from eval.predict import cli as predict_cli, predict, console, get_manifest, Def
|
|
15 |
from eval.evaluate import cli as evaluate_cli, evaluate, compute_metrics, get_to_print
|
16 |
from eval.evaluate import test_suite_evaluation, read_tables_json
|
17 |
|
18 |
-
zero = torch.Tensor([0]).cuda()
|
19 |
-
print(zero.device) # <-- 'cpu' 🤔
|
20 |
-
|
21 |
-
@spaces.GPU
|
22 |
def run_evaluation(model_name):
|
23 |
-
print(zero.device) # <-- 'cuda:0' 🤗
|
24 |
-
|
25 |
results = []
|
26 |
|
27 |
if "OPENROUTER_API_KEY" not in os.environ:
|
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
import os
|
3 |
import sys
|
4 |
from pathlib import Path
|
|
|
13 |
from eval.evaluate import cli as evaluate_cli, evaluate, compute_metrics, get_to_print
|
14 |
from eval.evaluate import test_suite_evaluation, read_tables_json
|
15 |
|
|
|
|
|
|
|
|
|
16 |
def run_evaluation(model_name):
|
|
|
|
|
17 |
results = []
|
18 |
|
19 |
if "OPENROUTER_API_KEY" not in os.environ:
|