Spaces:
Runtime error
Runtime error
osanseviero
commited on
Commit
•
e315d5b
1
Parent(s):
e1c15ee
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def query(payload):
|
|
33 |
print(response)
|
34 |
return json.loads(response.content.decode("utf-8"))
|
35 |
|
36 |
-
def inference(input_sentence, max_length, temperature,
|
37 |
top_k = None if top_k == 0 else top_k
|
38 |
payload = {"inputs": input_sentence,
|
39 |
"parameters": {"max_new_tokens": max_length, "top_k": top_k, "top_p": top_p, "temperature": temperature,
|
|
|
33 |
print(response)
|
34 |
return json.loads(response.content.decode("utf-8"))
|
35 |
|
36 |
+
def inference(input_sentence, max_length, temperature,top_k, top_p, greedy_decoding, seed=42):
|
37 |
top_k = None if top_k == 0 else top_k
|
38 |
payload = {"inputs": input_sentence,
|
39 |
"parameters": {"max_new_tokens": max_length, "top_k": top_k, "top_p": top_p, "temperature": temperature,
|