mployd-engineering commited on
Commit
4571d28
·
verified ·
1 Parent(s): df9a5b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -157,13 +157,13 @@ with gr.Blocks(title="CV & Job Matcher") as demo:
157
  # The output component for the structured JSON response
158
  output_display = gr.JSON(label="3. Match Output (Structured JSON Response)", scale=1)
159
 
160
- # *** THE FIX: The api_name argument is REMOVED for internal UI interactions. ***
161
- # Gradio will automatically call the correct internal endpoint (/run/predict).
162
  analyze_btn.click(
163
  fn=match_cv_jd,
164
  inputs=[cv_input, jd_input],
165
  outputs=output_display,
166
- # api_name="/predict" # <-- REMOVED THIS LINE
167
  )
168
 
169
  # --- Launch ---
 
157
  # The output component for the structured JSON response
158
  output_display = gr.JSON(label="3. Match Output (Structured JSON Response)", scale=1)
159
 
160
+ # To enable external API access (e.g., via curl), we explicitly set api_name.
161
+ # The public endpoint will be accessible at /api/predict.
162
  analyze_btn.click(
163
  fn=match_cv_jd,
164
  inputs=[cv_input, jd_input],
165
  outputs=output_display,
166
+ api_name="predict" # Re-enabling the public API name
167
  )
168
 
169
  # --- Launch ---