Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -52,9 +52,7 @@ def generate_text(request: Request, input_data: InputData):
|
|
52 |
max_new_tokens = input_data.max_new_tokens
|
53 |
top_p = input_data.top_p
|
54 |
repetition_penalty = input_data.repetition_penalty
|
55 |
-
input_text = generate_input_text(input_data)
|
56 |
-
if input_data.systemStyle != '':
|
57 |
-
input_text = input_text + '(' + input_data.systemStyle + ')'
|
58 |
max_new_tokens = min(max_new_tokens, 29500 - len(input_text))
|
59 |
print(f"{datetime.now()} - Input Text: {input_text}")
|
60 |
history = []
|
@@ -82,7 +80,7 @@ def generate_input_text(input_data):
|
|
82 |
"messages": [
|
83 |
{{
|
84 |
"role": "instructions",
|
85 |
-
"content": "{input_data.instruction}"
|
86 |
}},
|
87 |
{{
|
88 |
"role": "user",
|
|
|
52 |
max_new_tokens = input_data.max_new_tokens
|
53 |
top_p = input_data.top_p
|
54 |
repetition_penalty = input_data.repetition_penalty
|
55 |
+
input_text = generate_input_text(input_data)
|
|
|
|
|
56 |
max_new_tokens = min(max_new_tokens, 29500 - len(input_text))
|
57 |
print(f"{datetime.now()} - Input Text: {input_text}")
|
58 |
history = []
|
|
|
80 |
"messages": [
|
81 |
{{
|
82 |
"role": "instructions",
|
83 |
+
"content": "{input_data.instruction} "("{input_data.systemStyle}")"
|
84 |
}},
|
85 |
{{
|
86 |
"role": "user",
|