demo-test / template.py
yeonsue's picture
Upload folder using huggingface_hub
e547037 verified
raw
history blame
442 Bytes
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)