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