cotxetj commited on
Commit
d65e856
1 Parent(s): 1567e3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -116,17 +116,15 @@ def gpt_predict(inputs, request:gr.Request=gr.State([]), top_p = 1, temperature
116
 
117
  try:
118
  # make a POST request to the API endpoint using the requests.post method, passing in stream=True
119
- print('in the try')
120
  response = requests.post(API_URL, headers=headers, json=payload, stream=True)
121
  response_code = f"{response}"
122
- print(response_code)
123
  #if response_code.strip() != "<Response [200]>":
124
  # #print(f"response code - {response}")
125
  # raise Exception(f"Sorry, hitting rate limit. Please try again later. {response}")
126
  out = []
127
  for chunk in response.iter_lines():
128
  #Skipping first chunk
129
- print(chunk)
130
  if counter == 0:
131
  counter += 1
132
  continue
 
116
 
117
  try:
118
  # make a POST request to the API endpoint using the requests.post method, passing in stream=True
 
119
  response = requests.post(API_URL, headers=headers, json=payload, stream=True)
120
  response_code = f"{response}"
121
+
122
  #if response_code.strip() != "<Response [200]>":
123
  # #print(f"response code - {response}")
124
  # raise Exception(f"Sorry, hitting rate limit. Please try again later. {response}")
125
  out = []
126
  for chunk in response.iter_lines():
127
  #Skipping first chunk
 
128
  if counter == 0:
129
  counter += 1
130
  continue