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

Update app.py

Browse files

image
![Uploading _4dd209bb-922d-4909-a82a-14e35ad2651a.jpg…]()

Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -2,6 +2,19 @@ import gradio as gr
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")
@@ -72,4 +85,4 @@ textbox_preview = gr.Textbox(scale=7, container=False, value=EXAMPLE_INPUT)
72
  demo = gr.ChatInterface(test_preview_chatbot, chatbot=chatbot_preview, textbox=textbox_preview)
73
 
74
 
75
- demo.launch(share=True)
 
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
+ import gradio as gr
9
+ import os
10
+ import requests
11
+
12
+ html_temp = """
13
+ <div style="position: absolute; top: 0; right: 0;">
14
+ <img src='https://huggingface.co/spaces/NerdN/open-gpt-Image-Prompter/blob/main/_45a03b4d-ea0f-4b81-873d-ff6b10461d52.jpg' alt='Your Image' style='width:100px;height:100px;'>
15
+ </div>
16
+ """
17
+
18
  zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
19
 
20
  HF_TOKEN = os.getenv("HF_TOKEN")
 
85
  demo = gr.ChatInterface(test_preview_chatbot, chatbot=chatbot_preview, textbox=textbox_preview)
86
 
87
 
88
+ demo.launch(share=True)