Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -9,14 +9,14 @@ from sugerencias_nlp import procesar_comentarios
|
|
9 |
|
10 |
HF_TOKEN = os.environ.get("HF_TOKEN", "")
|
11 |
HEADERS = {"Authorization": f"Bearer {HF_TOKEN}"}
|
12 |
-
API_URL = "https://api-inference.huggingface.co/models/
|
13 |
|
14 |
def sugerencia_nlp_error(error_msg):
|
15 |
payload = {
|
16 |
"inputs": f"ERROR: {error_msg}\nSUGERENCIA:",
|
17 |
"parameters": {
|
18 |
-
"max_new_tokens":
|
19 |
-
"temperature": 0.
|
20 |
"return_full_text": False
|
21 |
}
|
22 |
}
|
|
|
9 |
|
10 |
HF_TOKEN = os.environ.get("HF_TOKEN", "")
|
11 |
HEADERS = {"Authorization": f"Bearer {HF_TOKEN}"}
|
12 |
+
API_URL = "https://api-inference.huggingface.co/models/huggingface/CodeBERTa-language-id"
|
13 |
|
14 |
def sugerencia_nlp_error(error_msg):
|
15 |
payload = {
|
16 |
"inputs": f"ERROR: {error_msg}\nSUGERENCIA:",
|
17 |
"parameters": {
|
18 |
+
"max_new_tokens": 40,
|
19 |
+
"temperature": 0.7,
|
20 |
"return_full_text": False
|
21 |
}
|
22 |
}
|