Spaces:
Running
Running
adding application
Browse files- __init__.py +0 -0
- app.py +3 -4
__init__.py
ADDED
|
File without changes
|
app.py
CHANGED
|
@@ -14,10 +14,9 @@ except ImportError:
|
|
| 14 |
PatchscopesRetriever = None
|
| 15 |
|
| 16 |
DEFAULT_MODEL = "meta-llama/Llama-3.1-8B" # light default so the demo boots everywhere
|
| 17 |
-
DEVICE =
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
# )
|
| 21 |
|
| 22 |
@lru_cache(maxsize=4)
|
| 23 |
def get_model_and_tokenizer(model_name: str):
|
|
|
|
| 14 |
PatchscopesRetriever = None
|
| 15 |
|
| 16 |
DEFAULT_MODEL = "meta-llama/Llama-3.1-8B" # light default so the demo boots everywhere
|
| 17 |
+
DEVICE = (
|
| 18 |
+
"cuda" if torch.cuda.is_available() else 'cpu'
|
| 19 |
+
)
|
|
|
|
| 20 |
|
| 21 |
@lru_cache(maxsize=4)
|
| 22 |
def get_model_and_tokenizer(model_name: str):
|