Hatman commited on
Commit
99fb8e0
·
verified ·
1 Parent(s): 074ccc3

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -92,6 +92,7 @@ async def core():
92
 
93
  def getPrompt(prompt, modelID, attempts=1):
94
  response = {}
 
95
  if modelID != magic_prompt_model:
96
  chat = [
97
  {"role": "user", "content": prompt_base},
@@ -105,9 +106,8 @@ def getPrompt(prompt, modelID, attempts=1):
105
  if attempts < 3:
106
  getPrompt(prompt, modelID, attempts + 1)
107
  else:
108
- try:
109
- print(modelID)
110
- apiData={"inputs":input, "parameters": parameters, "options": options, "timeout": 45}
111
  response = requests.post(API_URL + modelID, headers=headers, data=json.dumps(apiData))
112
  if response.status_code == 200:
113
  try:
 
92
 
93
  def getPrompt(prompt, modelID, attempts=1):
94
  response = {}
95
+ print(modelID)
96
  if modelID != magic_prompt_model:
97
  chat = [
98
  {"role": "user", "content": prompt_base},
 
106
  if attempts < 3:
107
  getPrompt(prompt, modelID, attempts + 1)
108
  else:
109
+ try:
110
+ apiData={"inputs":prompt, "parameters": parameters, "options": options, "timeout": 45}
 
111
  response = requests.post(API_URL + modelID, headers=headers, data=json.dumps(apiData))
112
  if response.status_code == 200:
113
  try: