Spaces:
Runtime error
Runtime error
Commit ·
33e9df8
1
Parent(s): 56eafc1
Update main.py
Browse files57 unmodified lines5859606162636412 unmodified lines7778798081828357 unmodified lineshistory = [] # Puoi definire la history se necessariogenerated_response = generate(input_text, history, temperature, max_new_tokens, top_p, repetition_penalty)return generated_response@app.post("/Immagine")def generate_image(request: Request, input_data: InputImage):12 unmodified lineswith open(image_url, 'rb') as img_file:img_binary = img_file.read()img_base64 = base64.b64encode(img_binary).decode('utf-8')return img_base64@app.get("/")def read_general():57 unmodified lines5859606162636412 unmodified lines7778798081828357 unmodified lineshistory = [] # Puoi definire la history se necessariogenerated_response = generate(input_text, history, temperature, max_new_tokens, top_p, repetition_penalty)return {"response": generated_response}@app.post("/Immagine")def generate_image(request: Request, input_data: InputImage):12 unmodified lineswith open(image_url, 'rb') as img_file:img_binary = img_file.read()img_base64 = base64.b64encode(img_binary).decode('utf-8')return {"response": img_base64}@app.get("/")def read_general():
main.py+2-2