Spaces:
Runtime error
Runtime error
Commit
·
c5e182a
1
Parent(s):
2217b4e
Adding debug messages
Browse files
app.py
CHANGED
@@ -4,6 +4,12 @@ import subprocess
|
|
4 |
import time
|
5 |
import signal
|
6 |
import atexit
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
SYSTEM_PROMPT = "You are a compliance assistant. Use the provided risk data to answer user questions. If a single risk object is given, provide a direct answer. If a list of risks is provided, summarize, compare, or analyze the collection as needed. Always base your response on the data provided."
|
9 |
hf_token = os.environ["HF_TOKEN"]
|
|
|
4 |
import time
|
5 |
import signal
|
6 |
import atexit
|
7 |
+
import torch
|
8 |
+
|
9 |
+
print("CUDA Available:", torch.cuda.is_available())
|
10 |
+
print("GPU Count:", torch.cuda.device_count())
|
11 |
+
print("Device Name:", torch.cuda.get_device_name(0) if torch.cuda.is_available() else "No GPU")
|
12 |
+
|
13 |
|
14 |
SYSTEM_PROMPT = "You are a compliance assistant. Use the provided risk data to answer user questions. If a single risk object is given, provide a direct answer. If a list of risks is provided, summarize, compare, or analyze the collection as needed. Always base your response on the data provided."
|
15 |
hf_token = os.environ["HF_TOKEN"]
|