Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,27 +28,32 @@ def generate_image(prompt):
|
|
28 |
|
29 |
if search_btn:
|
30 |
prompt1 = prompt + ". Give short answer to this question"
|
31 |
-
prompt2 = prompt + ". Give short
|
|
|
32 |
|
33 |
result1 = Client.create_completion("gpt3", prompt1)
|
34 |
result2 = Client.create_completion("gpt3", prompt2)
|
|
|
35 |
|
36 |
imageresult1 = generate_image(prompt + ". Create image of this in realistic style")
|
37 |
-
imageresult2 = generate_image(prompt + ". Create image of this in
|
38 |
imageresult3 = generate_image(prompt + ". Create image of this in black and white style")
|
39 |
|
40 |
with texts:
|
41 |
st.write("We found these results on your query: ")
|
42 |
-
|
43 |
st.header(result1.split()[0], divider='rainbow')
|
|
|
44 |
st.text(result1)
|
45 |
-
|
46 |
st.header(result2.split()[0], divider='rainbow')
|
|
|
47 |
st.text(result2)
|
|
|
48 |
st.caption("That's the end!")
|
49 |
|
50 |
with images:
|
51 |
-
im1, im2, im3 = st.
|
52 |
st.write("We found some images on your query: ")
|
53 |
with im1:
|
54 |
st.image(imageresult1)
|
|
|
28 |
|
29 |
if search_btn:
|
30 |
prompt1 = prompt + ". Give short answer to this question"
|
31 |
+
prompt2 = prompt + ". Give short documentary answer to this question"
|
32 |
+
prompt3 = prompt + ". Give short real life answer to this question"
|
33 |
|
34 |
result1 = Client.create_completion("gpt3", prompt1)
|
35 |
result2 = Client.create_completion("gpt3", prompt2)
|
36 |
+
result3 = Client.create_completion("gpt3", prompt3)
|
37 |
|
38 |
imageresult1 = generate_image(prompt + ". Create image of this in realistic style")
|
39 |
+
imageresult2 = generate_image(prompt + ". Create image of this in cinematic style")
|
40 |
imageresult3 = generate_image(prompt + ". Create image of this in black and white style")
|
41 |
|
42 |
with texts:
|
43 |
st.write("We found these results on your query: ")
|
44 |
+
|
45 |
st.header(result1.split()[0], divider='rainbow')
|
46 |
+
st.caption("gptedia.com")
|
47 |
st.text(result1)
|
48 |
+
|
49 |
st.header(result2.split()[0], divider='rainbow')
|
50 |
+
st.caption("reppit.com")
|
51 |
st.text(result2)
|
52 |
+
|
53 |
st.caption("That's the end!")
|
54 |
|
55 |
with images:
|
56 |
+
im1, im2, im3 = st.columns(3)
|
57 |
st.write("We found some images on your query: ")
|
58 |
with im1:
|
59 |
st.image(imageresult1)
|