Spaces:
No application file
No application file
Yaswanth sai
commited on
Commit
·
c741f25
1
Parent(s):
bb9e27e
error fix que
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def generate_response(task_description, code_snippet, request_type, mode="concis
|
|
64 |
return f"An error occurred: {str(e)}"
|
65 |
|
66 |
# Create Gradio interface with queuing enabled
|
67 |
-
with gr.Blocks(title="Live Coding HR Assistant") as demo:
|
68 |
gr.Markdown("# 💻 Live Coding HR Assistant")
|
69 |
gr.Markdown("Get hints, feedback, and follow-up questions for your coding tasks!")
|
70 |
|
@@ -104,13 +104,13 @@ with gr.Blocks(title="Live Coding HR Assistant") as demo:
|
|
104 |
inputs=[task_description, code_snippet, request_type, mode],
|
105 |
outputs=output,
|
106 |
api_name="predict",
|
107 |
-
queue=True,
|
108 |
max_batch_size=1
|
109 |
)
|
110 |
|
111 |
-
|
|
|
112 |
server_name="0.0.0.0",
|
113 |
server_port=7860,
|
114 |
-
share=True
|
115 |
-
enable_queue=True
|
116 |
)
|
|
|
64 |
return f"An error occurred: {str(e)}"
|
65 |
|
66 |
# Create Gradio interface with queuing enabled
|
67 |
+
with gr.Blocks(title="Live Coding HR Assistant", queue=True) as demo:
|
68 |
gr.Markdown("# 💻 Live Coding HR Assistant")
|
69 |
gr.Markdown("Get hints, feedback, and follow-up questions for your coding tasks!")
|
70 |
|
|
|
104 |
inputs=[task_description, code_snippet, request_type, mode],
|
105 |
outputs=output,
|
106 |
api_name="predict",
|
107 |
+
queue=True,
|
108 |
max_batch_size=1
|
109 |
)
|
110 |
|
111 |
+
# Launch with concurrency enabled
|
112 |
+
demo.queue(concurrency_count=1, max_size=10).launch(
|
113 |
server_name="0.0.0.0",
|
114 |
server_port=7860,
|
115 |
+
share=True
|
|
|
116 |
)
|