ysharma HF staff commited on
Commit
d1163d3
·
1 Parent(s): 1075494
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -28,7 +28,7 @@ def predict_chatgpt(inputs, top_p_chatgpt, temperature_chatgpt, openai_api_key,
28
  "Authorization": f"Bearer {openai_api_key}"
29
  }
30
  #debug
31
- #print(f"chat_counter_chatgpt - {chat_counter_chatgpt}")
32
 
33
  #Handling the different roles for ChatGPT
34
  if chat_counter_chatgpt != 0 :
@@ -58,8 +58,12 @@ def predict_chatgpt(inputs, top_p_chatgpt, temperature_chatgpt, openai_api_key,
58
  }
59
 
60
  chat_counter_chatgpt+=1
61
-
 
62
  history.append(inputs)
 
 
 
63
  # make a POST request to the API endpoint using the requests.post method, passing in stream=True
64
  response = requests.post(API_URL, headers=headers, json=payload, stream=True)
65
  token_counter = 0
 
28
  "Authorization": f"Bearer {openai_api_key}"
29
  }
30
  #debug
31
+ print(f"chat_counter_chatgpt - {chat_counter_chatgpt}")
32
 
33
  #Handling the different roles for ChatGPT
34
  if chat_counter_chatgpt != 0 :
 
58
  }
59
 
60
  chat_counter_chatgpt+=1
61
+
62
+ print(f"^^Payload is : {payload}")
63
  history.append(inputs)
64
+ print(f"^^inputs is : {inputs}")
65
+ print(f"^^history is : {history}")
66
+
67
  # make a POST request to the API endpoint using the requests.post method, passing in stream=True
68
  response = requests.post(API_URL, headers=headers, json=payload, stream=True)
69
  token_counter = 0