(input_text, input_image_prompt, history=[], input_para=None, image_is_encoded=True)
| 33 | return zh_pattern.search(text) |
| 34 | |
| 35 | def generate_input(input_text, input_image_prompt, history=[], input_para=None, image_is_encoded=True): |
| 36 | if not image_is_encoded: |
| 37 | image = input_image_prompt |
| 38 | else: |
| 39 | decoded_image = base64.b64decode(input_image_prompt) |
| 40 | image = Image.open(BytesIO(decoded_image)) |
| 41 | |
| 42 | input_data = {'input_query': input_text, 'input_image': image, 'history': history, 'gen_kwargs': input_para} |
| 43 | return input_data |
| 44 | |
| 45 | |
| 46 | def process_image(image_encoded): |
no outgoing calls
no test coverage detected