TA commited on
Commit
caecd73
1 Parent(s): a496030

Update app.py

Browse files

image
![_4dd209bb-922d-4909-a82a-14e35ad2651a.jpg](https://cdn-uploads.huggingface.co/production/uploads/64df20dc22d604b137270864/5wy8LBIKdLy_t-fA2JZC1.jpeg)

Files changed (1) hide show
  1. app.py +0 -61
app.py CHANGED
@@ -2,67 +2,6 @@ import gradio as gr
2
  import os
3
  import requests
4
 
5
- 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."
6
- TITLE = "Image Prompter"
7
- EXAMPLE_INPUT = "A Reflective cat between stars."
8
-
9
- # Path to your local image file
10
- enticing_image_path = "C:/Users/alain/Downloads/enticing_image.jpg"
11
-
12
- html_temp = f"""
13
- <!DOCTYPE html>
14
- <html>
15
- <head>
16
- <style>
17
- body {{
18
- font-family: Arial, sans-serif;
19
- }}
20
-
21
- .container {{
22
- text-align: center;
23
- background-color: #f4f4f4;
24
- padding: 20px;
25
- border-radius: 10px;
26
- }}
27
-
28
- h1 {{
29
- color: #333;
30
- }}
31
-
32
- .enticing-image {{
33
- width: 100px;
34
- height: 100px;
35
- border-radius: 50%;
36
- position: absolute;
37
- top: 0;
38
- right: 0;
39
- }}
40
-
41
- .main-image {{
42
- width: 300px;
43
- height: 300px;
44
- border-radius: 50%;
45
- }}
46
-
47
- p {{
48
- font-size: 18px;
49
- color: #555;
50
- }}
51
- </style>
52
- </head>
53
- <body>
54
- <div class="container">
55
- <h1>{TITLE}</h1>
56
- <div class="enticing-image">
57
- <img src='{enticing_image_path}' alt='Enticing Image'>
58
- </div>
59
- <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'>
60
- <p>{EXAMPLE_INPUT}</p>
61
- </div>
62
- </body>
63
- </html>
64
- """.format(TITLE, enticing_image_path, EXAMPLE_INPUT)
65
-
66
  zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
67
 
68
  HF_TOKEN = os.getenv("HF_TOKEN")
 
2
  import os
3
  import requests
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
6
 
7
  HF_TOKEN = os.getenv("HF_TOKEN")