Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,8 @@ def predict_next_token(model_name, text, top_k, custom_token=""):
|
|
79 |
def append_selected_token(text, selected_token):
|
80 |
"""Append selected token from dropdown to the text input."""
|
81 |
if selected_token:
|
82 |
-
|
|
|
83 |
return text
|
84 |
|
85 |
# Create the UI
|
|
|
79 |
def append_selected_token(text, selected_token):
|
80 |
"""Append selected token from dropdown to the text input."""
|
81 |
if selected_token:
|
82 |
+
clean_token = selected_token.strip("'")
|
83 |
+
text += f" {clean_token}"
|
84 |
return text
|
85 |
|
86 |
# Create the UI
|