Spaces:
Runtime error
Runtime error
feat: use the current generation params
Browse files
app.py
CHANGED
|
@@ -142,12 +142,14 @@ chat_interface = gr.ChatInterface(
|
|
| 142 |
cache_examples=False,
|
| 143 |
)
|
| 144 |
|
| 145 |
-
def evolve_text(
|
| 146 |
|
| 147 |
possible_generation = "".join([x for x in generate(
|
| 148 |
-
|
| 149 |
-
temperature=additional_inputs[1].value,
|
| 150 |
-
|
|
|
|
|
|
|
| 151 |
seed=42,
|
| 152 |
)][-1]) #TODO: need a smarter way to do this
|
| 153 |
|
|
|
|
| 142 |
cache_examples=False,
|
| 143 |
)
|
| 144 |
|
| 145 |
+
def evolve_text(x):
|
| 146 |
|
| 147 |
possible_generation = "".join([x for x in generate(
|
| 148 |
+
x, "", additional_inputs[0].value,
|
| 149 |
+
temperature=additional_inputs[1].value,
|
| 150 |
+
max_new_tokens=additional_inputs[2].value,
|
| 151 |
+
top_p=additional_inputs[3].value,
|
| 152 |
+
repetition_penalty=additional_inputs[4].value,
|
| 153 |
seed=42,
|
| 154 |
)][-1]) #TODO: need a smarter way to do this
|
| 155 |
|