yonikremer
commited on
Commit
•
7be248a
1
Parent(s):
6768469
set max input and output lengths to 512
Browse files- app.py +1 -1
- hanlde_form_submit.py +1 -1
- tests.py +1 -1
app.py
CHANGED
@@ -23,7 +23,7 @@ with st.form("request_form"):
|
|
23 |
output_length: int = st.number_input(
|
24 |
label="the length of the output (in tokens)",
|
25 |
min_value=1,
|
26 |
-
max_value=
|
27 |
value=5,
|
28 |
)
|
29 |
|
|
|
23 |
output_length: int = st.number_input(
|
24 |
label="the length of the output (in tokens)",
|
25 |
min_value=1,
|
26 |
+
max_value=512,
|
27 |
value=5,
|
28 |
)
|
29 |
|
hanlde_form_submit.py
CHANGED
@@ -37,7 +37,7 @@ def create_pipeline(model_name: str) -> GroupedSamplingPipeLine:
|
|
37 |
pipeline_start_time = time()
|
38 |
pipeline = GroupedSamplingPipeLine(
|
39 |
model_name=model_name,
|
40 |
-
group_size=
|
41 |
end_of_sentence_stop=False,
|
42 |
top_k=50,
|
43 |
load_in_8bit=False,
|
|
|
37 |
pipeline_start_time = time()
|
38 |
pipeline = GroupedSamplingPipeLine(
|
39 |
model_name=model_name,
|
40 |
+
group_size=512,
|
41 |
end_of_sentence_stop=False,
|
42 |
top_k=50,
|
43 |
load_in_8bit=False,
|
tests.py
CHANGED
@@ -22,7 +22,7 @@ def test_on_form_submit():
|
|
22 |
AVAILABLE_MODELS,
|
23 |
)
|
24 |
def test_create_pipeline(model_name: str):
|
25 |
-
pipeline: GroupedSamplingPipeLine = create_pipeline(model_name
|
26 |
assert pipeline is not None
|
27 |
assert pipeline.model_name == model_name
|
28 |
assert pipeline.wrapped_model.group_size == 5
|
|
|
22 |
AVAILABLE_MODELS,
|
23 |
)
|
24 |
def test_create_pipeline(model_name: str):
|
25 |
+
pipeline: GroupedSamplingPipeLine = create_pipeline(model_name)
|
26 |
assert pipeline is not None
|
27 |
assert pipeline.model_name == model_name
|
28 |
assert pipeline.wrapped_model.group_size == 5
|