Spaces:
Runtime error
Runtime error
acumplid
commited on
Commit
·
53b77b7
1
Parent(s):
e19dfe7
Replaced old naming arguments
Browse files
app.py
CHANGED
@@ -106,7 +106,7 @@ with gr.Blocks(**AinaGradioTheme().get_kwargs()) as demo:
|
|
106 |
api_name=False
|
107 |
)
|
108 |
|
109 |
-
input_.change(fn=None, inputs=[input_, placeholder_max_characters],
|
110 |
document.getElementById('countertext').textContent = i.length > m && 'Max length ' + m + ' characters. ' || ''
|
111 |
document.getElementById('inputlenght').textContent = i.length + ' '
|
112 |
document.getElementById('inputlenght').style.color = (i.length > m) ? "#ef4444" : "";
|
|
|
106 |
api_name=False
|
107 |
)
|
108 |
|
109 |
+
input_.change(fn=None, inputs=[input_, placeholder_max_characters], _js="""(i, m) => {
|
110 |
document.getElementById('countertext').textContent = i.length > m && 'Max length ' + m + ' characters. ' || ''
|
111 |
document.getElementById('inputlenght').textContent = i.length + ' '
|
112 |
document.getElementById('inputlenght').style.color = (i.length > m) ? "#ef4444" : "";
|