79116937

Date: 2024-10-23 07:54:37
Score: 1
Natty:
Report link

i have explored and found that we need to modify the code to add images in html

import gradio as gr

with gr.Blocks() as demo:
    # add file before your image file path
    gr.HTML("<img src='file/image.png' alt='image One'>")

# add allowed_path  in launch
demo.launch(allowed_paths=["."])
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Farooq Zaman