Spaces:
Runtime error
Runtime error
Update utility/utils.py
Browse files185 unmodified lines186187188189190191192193194195196197198185 unmodified linesOutput:'''# Call the API for inferenceresponse = client.text_generation(text, max_new_tokens=600)#, temperature=0.4, top_k=50, top_p=0.9, repetition_penalty=1.2)print("parse in text ---:",response)# Convert the response text to JSONtry:json_data = json.loads(response)return json_dataexcept json.JSONDecodeError as e:return {"error": f"Error decoding JSON: {e}"}185 unmodified lines186187188189190191192193194195196197198199185 unmodified linesOutput:'''# Call the API for inferenceresponse = client.text_generation(text, max_new_tokens=1000)#, temperature=0.4, top_k=50, top_p=0.9, repetition_penalty=1.2)print("parse in text ---:",response)# Convert the response text to JSONtry:json_data = json.loads(response)print("Json_data-------------->",json_data)return json_dataexcept json.JSONDecodeError as e:return {"error": f"Error decoding JSON: {e}"}
utility/utils.py+2-1