Spaces:
Sleeping
Sleeping
Update main.py
Browse files72 unmodified lines737475767778794 unmodified lines848586878889904 unmodified lines959697989910010172 unmodified lineshistory = []generated_response = generate(input_text, history, temperature, max_new_tokens, top_p, repetition_penalty)generated_response = generated_response.replace('"', '')generated_response = generated_response.replace('`', '')LoggaTesto("RISPOSTA", {"response": generated_response})return {"response": generated_response}else:4 unmodified linesinput_data.systemRole = input_data.systemRole + msgEliminaRisposteNonPertinentiresult_data = asyncio.run(GeneraTestoAsync("https://matteoscript-fastapi.hf.space/Genera", input_data))result_data = result_data.replace('"', '')result_data = result_data.replace('`', '')LoggaTesto("RISPOSTA ASINCRONA", {"response": result_data})if input_data.EliminaRisposteNonPertinenti:result_data = [item for item in result_data if "NOTFOUND" not in item["response"]]4 unmodified linesinput_data.instruction =''result_data = asyncio.run(GeneraTestoAsync("https://matteoscript-fastapi.hf.space/Genera", input_data))result_data = result_data.replace('"', '')result_data = result_data.replace('`', '')LoggaTesto("RISPOSTA ASINCRONA UNIFICATA", {"response": result_data})return {"response": result_data}72 unmodified lines7374757677784 unmodified lines8384858687884 unmodified lines93949596979872 unmodified lineshistory = []generated_response = generate(input_text, history, temperature, max_new_tokens, top_p, repetition_penalty)generated_response = generated_response.replace('"', '')LoggaTesto("RISPOSTA", {"response": generated_response})return {"response": generated_response}else:4 unmodified linesinput_data.systemRole = input_data.systemRole + msgEliminaRisposteNonPertinentiresult_data = asyncio.run(GeneraTestoAsync("https://matteoscript-fastapi.hf.space/Genera", input_data))result_data = result_data.replace('"', '')LoggaTesto("RISPOSTA ASINCRONA", {"response": result_data})if input_data.EliminaRisposteNonPertinenti:result_data = [item for item in result_data if "NOTFOUND" not in item["response"]]4 unmodified linesinput_data.instruction =''result_data = asyncio.run(GeneraTestoAsync("https://matteoscript-fastapi.hf.space/Genera", input_data))result_data = result_data.replace('"', '')LoggaTesto("RISPOSTA ASINCRONA UNIFICATA", {"response": result_data})return {"response": result_data}
main.py-3