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