Spaces:
Runtime error
Runtime error
acumplid
commited on
Commit
·
9a4f043
1
Parent(s):
53b77b7
Replaced gradio version to fix error
Browse files- app.py +5 -9
- requirements.txt +1 -1
app.py
CHANGED
@@ -102,8 +102,7 @@ with gr.Blocks(**AinaGradioTheme().get_kwargs()) as demo:
|
|
102 |
input_.change(
|
103 |
fn=check_max_characters,
|
104 |
inputs=[input_, placeholder_max_characters],
|
105 |
-
outputs=[clear_btn, submit_btn]
|
106 |
-
api_name=False
|
107 |
)
|
108 |
|
109 |
input_.change(fn=None, inputs=[input_, placeholder_max_characters], _js="""(i, m) => {
|
@@ -116,18 +115,15 @@ with gr.Blocks(**AinaGradioTheme().get_kwargs()) as demo:
|
|
116 |
fn=clear,
|
117 |
inputs=[],
|
118 |
outputs=[input_, output],
|
119 |
-
queue=False
|
120 |
-
api_name=False,
|
121 |
)
|
122 |
|
123 |
submit_btn.click(
|
124 |
fn=submit_input,
|
125 |
inputs=[input_],
|
126 |
-
outputs=[output]
|
127 |
-
concurrency_limit=1,
|
128 |
-
api_name="get-results"
|
129 |
)
|
130 |
|
131 |
if __name__ == "__main__":
|
132 |
-
demo.queue(api_open=False)
|
133 |
-
demo.launch(show_api=
|
|
|
102 |
input_.change(
|
103 |
fn=check_max_characters,
|
104 |
inputs=[input_, placeholder_max_characters],
|
105 |
+
outputs=[clear_btn, submit_btn]
|
|
|
106 |
)
|
107 |
|
108 |
input_.change(fn=None, inputs=[input_, placeholder_max_characters], _js="""(i, m) => {
|
|
|
115 |
fn=clear,
|
116 |
inputs=[],
|
117 |
outputs=[input_, output],
|
118 |
+
queue=False
|
|
|
119 |
)
|
120 |
|
121 |
submit_btn.click(
|
122 |
fn=submit_input,
|
123 |
inputs=[input_],
|
124 |
+
outputs=[output]
|
|
|
|
|
125 |
)
|
126 |
|
127 |
if __name__ == "__main__":
|
128 |
+
demo.queue(concurrency_count=1, api_open=False)
|
129 |
+
demo.launch(show_api=False)
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
transformers==4.34.0
|
2 |
-
gradio==
|
3 |
aina-gradio-theme==1.0
|
4 |
torch==2.1.0
|
5 |
python-dotenv==1.0.0
|
|
|
1 |
transformers==4.34.0
|
2 |
+
gradio==3.50.2
|
3 |
aina-gradio-theme==1.0
|
4 |
torch==2.1.0
|
5 |
python-dotenv==1.0.0
|