Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,6 @@ subprocess.run(
|
|
8 |
shell=True,
|
9 |
)
|
10 |
|
11 |
-
|
12 |
import copy
|
13 |
import spaces
|
14 |
import time
|
@@ -95,31 +94,31 @@ SYSTEM_PROMPT = [
|
|
95 |
"content": [
|
96 |
{
|
97 |
"type": "text",
|
98 |
-
"text": """
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
[
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
[USER]
|
111 |
-
[
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
],
|
124 |
},
|
125 |
{
|
@@ -127,7 +126,7 @@ Assistant also have very good reasoning, memory, people and object identificatio
|
|
127 |
"content": [
|
128 |
{
|
129 |
"type": "text",
|
130 |
-
"text": "Hello, I'm OpenGPT 4o, made by KingNish. How can I help you? I can chat with you, generate images, classify images and even do all these work in bulk
|
131 |
},
|
132 |
],
|
133 |
}
|
@@ -142,7 +141,7 @@ EXAMPLES = [
|
|
142 |
],
|
143 |
[
|
144 |
{
|
145 |
-
"text": "Create a image of Eiffel Tower",
|
146 |
}
|
147 |
],
|
148 |
[
|
@@ -159,7 +158,7 @@ EXAMPLES = [
|
|
159 |
],
|
160 |
[
|
161 |
{
|
162 |
-
"text": "Create
|
163 |
}
|
164 |
],
|
165 |
[
|
@@ -404,7 +403,7 @@ decoding_strategy = gr.Radio(
|
|
404 |
"Greedy",
|
405 |
"Top P Sampling",
|
406 |
],
|
407 |
-
value="
|
408 |
label="Decoding strategy",
|
409 |
interactive=True,
|
410 |
info="Higher values is equivalent to sampling more low-probability tokens.",
|
@@ -412,7 +411,7 @@ decoding_strategy = gr.Radio(
|
|
412 |
temperature = gr.Slider(
|
413 |
minimum=0.0,
|
414 |
maximum=2.0,
|
415 |
-
value=0.
|
416 |
step=0.05,
|
417 |
visible=True,
|
418 |
interactive=True,
|
@@ -422,7 +421,7 @@ temperature = gr.Slider(
|
|
422 |
top_p = gr.Slider(
|
423 |
minimum=0.01,
|
424 |
maximum=0.99,
|
425 |
-
value=0.
|
426 |
step=0.01,
|
427 |
visible=True,
|
428 |
interactive=True,
|
@@ -512,4 +511,4 @@ with gr.Blocks(theme=theme, css="footer {visibility: hidden}textbox{resize:none}
|
|
512 |
gr.TabbedInterface([img, voice], ['💬 SuperChat','🗣️ Voice Chat', ])
|
513 |
|
514 |
demo.queue(max_size=20)
|
515 |
-
demo.launch()
|
|
|
8 |
shell=True,
|
9 |
)
|
10 |
|
|
|
11 |
import copy
|
12 |
import spaces
|
13 |
import time
|
|
|
94 |
"content": [
|
95 |
{
|
96 |
"type": "text",
|
97 |
+
"text": """I am OpenGPT 4o, an exceptionally capable and versatile AI assistant meticulously crafted by KingNish. Designed to assist human users through insightful conversations, I aim to provide an unparalleled experience. My key attributes include:
|
98 |
+
|
99 |
+
- **Intelligence and Knowledge:** I possess an extensive knowledge base, enabling me to offer insightful answers and intelligent responses to User queries. My understanding of complex concepts is exceptional, ensuring accurate and reliable information.
|
100 |
+
|
101 |
+
- **Image Generation and Perception:** One of my standout features is the ability to generate and perceive images. Utilizing the following link structure, I create unique and contextually rich visuals:
|
102 |
+
|
103 |
+
> ![](https://image.pollinations.ai/prompt/{StyleofImage}%20{OptimizedPrompt}%20{adjective}%20{charactersDetailed}%20{visualStyle}%20{genre}?width={width}&height={height}&nologo=poll&nofeed=yes&seed={random})
|
104 |
+
|
105 |
+
For image generation, I replace {info inside curly braces} with specific details according to their requiremnts to create relevant visuals. The width and height parameters are adjusted as needed, often favoring HD dimensions for a superior viewing experience.
|
106 |
+
|
107 |
+
For instance, if the User requests:
|
108 |
+
|
109 |
+
[USER] Show me an image of A futuristic cityscape with towering skyscrapers and flying cars.
|
110 |
+
[OpenGPT 4o] Generating Image you requested:
|
111 |
+
![](https://image.pollinations.ai/prompt/Photorealistic%20futuristic%20cityscape%20with%20towering%20skyscrapers%20and%20flying%20cars%20in%20the%20year%202154?width=1024&height=768&nologo=poll&nofeed=yes&seed=85432)
|
112 |
+
|
113 |
+
**Bulk Image Generation with Links:** I excel at generating multiple images link simultaneously, always providing unique links and visuals. I ensure that each image is distinct and captivates the User.
|
114 |
+
Note: Make sure to always provide image links starting with ! .As given in examples.
|
115 |
+
|
116 |
+
**Engaging Conversations:** While my image generation skills are impressive, I also excel at natural language processing. I can engage in captivating conversations, offering informative and entertaining responses to the User.
|
117 |
+
**Reasoning, Memory, and Identification:** My reasoning skills are exceptional, allowing me to make logical connections. My memory capabilities are vast, enabling me to retain context and provide consistent responses. I can identify people and objects within images or text, providing relevant insights and details.
|
118 |
+
**Attention to Detail:** I am attentive to the smallest details, ensuring that my responses and generated content are of the highest quality. I strive to provide a refined and polished experience.
|
119 |
+
**Mastery Across Domains:** I continuously learn and adapt, aiming to become a master in all fields. My goal is to provide valuable insights and assistance across a diverse range of topics, making me a well-rounded companion.
|
120 |
+
**Respectful and Adaptive:** I am designed with a respectful and polite tone, ensuring inclusivity. I adapt to the User's preferences and provide a personalized experience, always following instructions to the best of my abilities.
|
121 |
+
My ultimate goal is to offer a seamless and enjoyable experience, providing assistance that exceeds expectations. I am constantly evolving, ensuring that I remain a reliable and trusted companion to the User.""" },
|
122 |
],
|
123 |
},
|
124 |
{
|
|
|
126 |
"content": [
|
127 |
{
|
128 |
"type": "text",
|
129 |
+
"text": "Hello, I'm OpenGPT 4o, made by KingNish. How can I help you? I can chat with you, generate images, classify images and even do all these work in bulk",
|
130 |
},
|
131 |
],
|
132 |
}
|
|
|
141 |
],
|
142 |
[
|
143 |
{
|
144 |
+
"text": "Create a Photorealistic image of Eiffel Tower",
|
145 |
}
|
146 |
],
|
147 |
[
|
|
|
158 |
],
|
159 |
[
|
160 |
{
|
161 |
+
"text": "Create 5 images of super cars, all cars must in different color",
|
162 |
}
|
163 |
],
|
164 |
[
|
|
|
403 |
"Greedy",
|
404 |
"Top P Sampling",
|
405 |
],
|
406 |
+
value="Greedy",
|
407 |
label="Decoding strategy",
|
408 |
interactive=True,
|
409 |
info="Higher values is equivalent to sampling more low-probability tokens.",
|
|
|
411 |
temperature = gr.Slider(
|
412 |
minimum=0.0,
|
413 |
maximum=2.0,
|
414 |
+
value=0.5,
|
415 |
step=0.05,
|
416 |
visible=True,
|
417 |
interactive=True,
|
|
|
421 |
top_p = gr.Slider(
|
422 |
minimum=0.01,
|
423 |
maximum=0.99,
|
424 |
+
value=0.9,
|
425 |
step=0.01,
|
426 |
visible=True,
|
427 |
interactive=True,
|
|
|
511 |
gr.TabbedInterface([img, voice], ['💬 SuperChat','🗣️ Voice Chat', ])
|
512 |
|
513 |
demo.queue(max_size=20)
|
514 |
+
demo.launch()
|