У меня есть код: import gradio as gr
from rembg import remove

# Функция для удаления водяных знаков с изображения
def remove_watermark(input_image):
    # Загрузка изображения и удаление фона
    with open("input.png", "wb") as f:
        f.write(input_image.read())

    output = remove("input.png")

    return output.tobytes()

# Создание Gradio приложения
iface = gr.Interface(
    fn=remove_watermark,
    inputs=gr.inputs.Image(),
    outputs=gr.outputs.Image(),
    live=True,
    capture_session=True
)

iface.launch() и ошибка: Traceback (most recent call last):
  File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 427, in call_prediction
    output = await route_utils.call_process_api(
  File "/home/user/.local/lib/python3.10/site-packages/gradio/route_utils.py", line 232, in call_process_api
    output = await app.get_blocks().process_api(
  File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1484, in process_api
    result = await self.call_function(
  File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1106, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/user/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/home/user/.local/lib/python3.10/site-packages/gradio/utils.py", line 665, in wrapper
    response = f(*args, **kwargs)
  File "/home/user/app/app.py", line 8, in remove_watermark
    f.write(input_image.read())
AttributeError: 'numpy.ndarray' object has no attribute 'read'
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 427, in call_prediction
    output = await route_utils.call_process_api(
  File "/home/user/.local/lib/python3.10/site-packages/gradio/route_utils.py", line 232, in call_process_api
    output = await app.get_blocks().process_api(
  File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1484, in process_api
    result = await self.call_function(
  File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1106, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/user/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/home/user/.local/lib/python3.10/site-packages/gradio/utils.py", line 665, in wrapper
    response = f(*args, **kwargs)
  File "/home/user/app/app.py", line 8, in remove_watermark
    f.write(input_image.read())
AttributeError: 'numpy.ndarray' object has no attribute 'read'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 472, in process_events
    response = await self.call_prediction(awake_events, batch)
  File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 436, in call_prediction
    raise Exception(str(error) if show_error else None) from error
Exception: None — исправь ошибку и отправь готовый код