rr19tech commited on
Commit
e46a1bc
·
verified ·
1 Parent(s): 5b68cd9
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,7 +51,7 @@ app = Server()
51
 
52
  # Define Method 1: Triggers when client calls /gradio_api/call/update_data
53
  @app.api(name="call_private_api")
54
- def call_private_api(user_input):
55
  # Pass the token in the Authorization header
56
  headers = {
57
  "Authorization": f"Bearer {HF_TOKEN}",
@@ -82,7 +82,7 @@ def call_private_api(user_input):
82
 
83
  # Define Method 2: Triggers when client calls /gradio_api/call/process_action
84
  @app.api(name="user_feedback")
85
- def process_user_feedback(user_input):
86
  # Logic for different client actions
87
  return f"user feedback received '{user_input}' processed on server."
88
 
 
51
 
52
  # Define Method 1: Triggers when client calls /gradio_api/call/update_data
53
  @app.api(name="call_private_api")
54
+ def call_private_api(user_input: str):
55
  # Pass the token in the Authorization header
56
  headers = {
57
  "Authorization": f"Bearer {HF_TOKEN}",
 
82
 
83
  # Define Method 2: Triggers when client calls /gradio_api/call/process_action
84
  @app.api(name="user_feedback")
85
+ def process_user_feedback(user_input: str):
86
  # Logic for different client actions
87
  return f"user feedback received '{user_input}' processed on server."
88