File size: 442 Bytes
1ade98b e547037 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
import base64
def inference(user_prompt):
user_prompt = user_prompt
t2i_systemprompt = ""
result_img="/home/suhyeonlim/gauviz/gradio/resource/sample_img.jpg"
with open(result_img, 'rb') as image_file:
base64_string = base64.b64encode(image_file.read()).decode('utf-8')
demo = gr.Interface(fn=inference, inputs="textbox", outputs="textbox")
if __name__ == "__main__":
demo.launch(share=True) |