updated
Browse files
app.py
CHANGED
@@ -3,8 +3,6 @@ from transformers import pipeline
|
|
3 |
from PIL import Image
|
4 |
|
5 |
|
6 |
-
|
7 |
-
|
8 |
st.header("Character Captions")
|
9 |
st.write("Have a character caption any image you upload!")
|
10 |
character = st.selectbox("Choose a character", ["rapper", "monkey", "shrek", "unintelligible"])
|
@@ -32,16 +30,5 @@ if uploaded_img is not None:
|
|
32 |
prompt = character_prompts[character]
|
33 |
st.write(prompt)
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
# pipe = pipeline("text-generation", model="meta-llama/Meta-Llama-Guard-2-8B")
|
39 |
-
|
40 |
-
# # Pass the caption to another model
|
41 |
-
|
42 |
-
# personality = "rapper"
|
43 |
-
# prompt = personality_prompts[personality]
|
44 |
-
|
45 |
-
# styled_caption = text_generator(prompt, max_length=100, num_return_sequences=1)
|
46 |
-
|
47 |
-
# print(styled_caption[0]["generated_text"])
|
|
|
3 |
from PIL import Image
|
4 |
|
5 |
|
|
|
|
|
6 |
st.header("Character Captions")
|
7 |
st.write("Have a character caption any image you upload!")
|
8 |
character = st.selectbox("Choose a character", ["rapper", "monkey", "shrek", "unintelligible"])
|
|
|
30 |
prompt = character_prompts[character]
|
31 |
st.write(prompt)
|
32 |
|
33 |
+
personality = "rapper"
|
34 |
+
prompt = character_prompts[personality]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|