Spaces:
Runtime error
Runtime error
Update app_onnx.py
Browse files- app_onnx.py +3 -0
app_onnx.py
CHANGED
|
@@ -19,7 +19,10 @@ from midi_tokenizer import MIDITokenizer
|
|
| 19 |
|
| 20 |
MAX_SEED = np.iinfo(np.int32).max
|
| 21 |
in_space = os.getenv("SYSTEM") == "spaces"
|
|
|
|
|
|
|
| 22 |
|
|
|
|
| 23 |
|
| 24 |
def softmax(x, axis):
|
| 25 |
x_max = np.amax(x, axis=axis, keepdims=True)
|
|
|
|
| 19 |
|
| 20 |
MAX_SEED = np.iinfo(np.int32).max
|
| 21 |
in_space = os.getenv("SYSTEM") == "spaces"
|
| 22 |
+
from huggingface_hub import login
|
| 23 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 24 |
|
| 25 |
+
login(token=hf_token) # Get token from huggingface.co/settings/tokens
|
| 26 |
|
| 27 |
def softmax(x, axis):
|
| 28 |
x_max = np.amax(x, axis=axis, keepdims=True)
|