Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,12 +12,12 @@ def infer(
|
|
| 12 |
prompt,
|
| 13 |
model_name,
|
| 14 |
max_new_tokens=10,
|
| 15 |
-
temperature=0.
|
| 16 |
top_p=1.0,
|
| 17 |
top_k=40,
|
| 18 |
num_completions=1,
|
| 19 |
seed=42,
|
| 20 |
-
stop="
|
| 21 |
):
|
| 22 |
model_name_map = {
|
| 23 |
"GPT-JT-6B-v1": "Together-gpt-JT-6B-v1",
|
|
@@ -120,7 +120,7 @@ def main():
|
|
| 120 |
st.session_state.prompt = "Please answer the following question:\n\nQuestion: In which country is Zurich located?\nAnswer:"
|
| 121 |
|
| 122 |
if 'temperature' not in st.session_state:
|
| 123 |
-
st.session_state.temperature = "0.
|
| 124 |
|
| 125 |
if 'top_p' not in st.session_state:
|
| 126 |
st.session_state.top_p = "1.0"
|
|
@@ -147,7 +147,7 @@ def main():
|
|
| 147 |
top_p = st.text_input('top_p', st.session_state.top_p)
|
| 148 |
# num_completions = st.text_input('num_completions (only the best one will be returend)', "1")
|
| 149 |
num_completions = "1"
|
| 150 |
-
stop = st.text_input('stop, split by;', r'
|
| 151 |
# seed = st.text_input('seed', "42")
|
| 152 |
seed = "42"
|
| 153 |
|
|
|
|
| 12 |
prompt,
|
| 13 |
model_name,
|
| 14 |
max_new_tokens=10,
|
| 15 |
+
temperature=0.1,
|
| 16 |
top_p=1.0,
|
| 17 |
top_k=40,
|
| 18 |
num_completions=1,
|
| 19 |
seed=42,
|
| 20 |
+
stop="."
|
| 21 |
):
|
| 22 |
model_name_map = {
|
| 23 |
"GPT-JT-6B-v1": "Together-gpt-JT-6B-v1",
|
|
|
|
| 120 |
st.session_state.prompt = "Please answer the following question:\n\nQuestion: In which country is Zurich located?\nAnswer:"
|
| 121 |
|
| 122 |
if 'temperature' not in st.session_state:
|
| 123 |
+
st.session_state.temperature = "0.1"
|
| 124 |
|
| 125 |
if 'top_p' not in st.session_state:
|
| 126 |
st.session_state.top_p = "1.0"
|
|
|
|
| 147 |
top_p = st.text_input('top_p', st.session_state.top_p)
|
| 148 |
# num_completions = st.text_input('num_completions (only the best one will be returend)', "1")
|
| 149 |
num_completions = "1"
|
| 150 |
+
stop = st.text_input('stop, split by;', r'.')
|
| 151 |
# seed = st.text_input('seed', "42")
|
| 152 |
seed = "42"
|
| 153 |
|