skyvera commited on
Commit
25a0dbc
·
verified ·
1 Parent(s): 949b382

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,8 +1,13 @@
1
  import gradio as gr
2
  import requests
 
 
 
 
 
3
 
4
  def make_api_call(authorization_key, prompt, phone_number):
5
- print(f"Making API call with prompt: {prompt} and phone number: {phone_number}")
6
 
7
  headers = {
8
  'Authorization': authorization_key
@@ -34,7 +39,7 @@ def make_api_call(authorization_key, prompt, phone_number):
34
  }
35
 
36
  response = requests.post('https://api.bland.ai/v1/calls', json=data, headers=headers)
37
- print(f"API call response: {response.json()}")
38
  return response.json()
39
 
40
  interface = gr.Interface(
 
1
  import gradio as gr
2
  import requests
3
+ import logging
4
+
5
+ # Configure logging
6
+ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
7
+
8
 
9
  def make_api_call(authorization_key, prompt, phone_number):
10
+ logging.info(f"Making API call with prompt: {prompt} and phone number: {phone_number}")
11
 
12
  headers = {
13
  'Authorization': authorization_key
 
39
  }
40
 
41
  response = requests.post('https://api.bland.ai/v1/calls', json=data, headers=headers)
42
+ logging.info(f"API call response: {response.json()}")
43
  return response.json()
44
 
45
  interface = gr.Interface(