Spaces:
Runtime error
Runtime error
File size: 1,700 Bytes
edf2a04 ebe55ae 511e5e9 5b7a61e 96134fd ef43705 e72ab86 ef43705 ebe55ae ef43705 e72ab86 ef43705 ebe55ae ef43705 ebe55ae ef43705 e72ab86 ef43705 ff5d575 ef43705 5becc54 511e5e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
import gradio as gr
import os
import requests
SYSTEM_PROMPT = "As an LLM, your job is to generate detailed prompts that start with generate the image, for image generation models based on user input. Be descriptive and specific, but also make sure your prompts are clear and concise."
TITLE = "Image Prompter"
EXAMPLE_INPUT = "A Reflective cat between stars."
# Path to your local image file
enticing_image_path = "C:/Users/alain/Downloads/enticing_image.jpg"
html_temp = """
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
}
.container {
text-align: center;
background-color: #f4f4f4;
padding: 20px;
border-radius: 10px;
}
h1 {
color: #333;
}
.enticing-image {
width: 100px;
height: 100px;
border-radius: 50%;
position: absolute;
top: 0;
right: 0;
}
.main-image {
width: 300px;
height: 300px;
border-radius: 50%;
}
p {
font-size: 18px;
color: #555;
}
</style>
</head>
<body>
<div class="container">
<h1>{}</h1>
<div class="enticing-image">
<img src='{}' alt='Enticing Image'>
</div>
<img class="main-image" src='https://huggingface.co/spaces/NerdN/open-gpt-Image-Prompter/blob/main/_45a03b4d-ea0f-4b81-873d-ff6b10461d52.jpg' alt='Your Image'>
<p>{}</p>
</div>
</body>
</html>
""".format(TITLE, enticing_image_path, EXAMPLE_INPUT)
# Rest of the code remains unchanged
demo = gr.ChatInterface(test_preview_chatbot, chatbot=chatbot_preview, textbox=textbox_preview, title=None, html=html_temp)
demo.launch(share=True)
|