Spaces:
Runtime error
Runtime error
Commit
•
4032f9e
1
Parent(s):
fa7a46e
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,11 @@ def query(payload):
|
|
39 |
return response.json()
|
40 |
|
41 |
def inference(input_sentence, max_length, sample_or_greedy, raw_text=False):
|
42 |
-
payload = {
|
|
|
|
|
|
|
|
|
43 |
|
44 |
data = query(
|
45 |
payload
|
@@ -64,7 +68,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=False):
|
|
64 |
BOX_COMP: "#120F25",
|
65 |
}
|
66 |
|
67 |
-
new_string = data['generated_text'][0]
|
68 |
|
69 |
_, img = main(
|
70 |
input_sentence,
|
|
|
39 |
return response.json()
|
40 |
|
41 |
def inference(input_sentence, max_length, sample_or_greedy, raw_text=False):
|
42 |
+
payload = {
|
43 |
+
"prompt": input_sentence,
|
44 |
+
"do_sample": True,
|
45 |
+
#"max_new_tokens": max_length
|
46 |
+
}
|
47 |
|
48 |
data = query(
|
49 |
payload
|
|
|
68 |
BOX_COMP: "#120F25",
|
69 |
}
|
70 |
|
71 |
+
new_string = data['generated_text'][0]
|
72 |
|
73 |
_, img = main(
|
74 |
input_sentence,
|