Spaces:
Running
Running
bilgeyucel
commited on
Commit
•
6cd4cbd
1
Parent(s):
e19e5f9
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ image_to_text = TransformersImageToText(
|
|
25 |
|
26 |
prompt_template = PromptTemplate(prompt="""
|
27 |
You will receive a descriptive text of a photo.
|
28 |
-
Try to
|
29 |
|
30 |
Descriptive text: {documents};
|
31 |
Instagram Caption:
|
@@ -46,7 +46,7 @@ with gr.Blocks(theme="soft") as demo:
|
|
46 |
with gr.Row():
|
47 |
image = gr.Image(type="filepath")
|
48 |
with gr.Column():
|
49 |
-
model_name = gr.Dropdown(["OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5", "tiiuae/falcon-7b-instruct", "tiiuae/falcon-7b", "HuggingFaceH4/starchat-beta", "bigscience/bloom", "google/flan-t5-xxl"], value="
|
50 |
gr.Examples(["./whale.png", "./rainbow.jpeg", "./selfie.png"], inputs=image, label="Click on any example")
|
51 |
submit_btn = gr.Button("✨ Captionate ✨")
|
52 |
caption = gr.Textbox(label="Caption", show_copy_button=True)
|
|
|
25 |
|
26 |
prompt_template = PromptTemplate(prompt="""
|
27 |
You will receive a descriptive text of a photo.
|
28 |
+
Try to generate a nice Instagram caption with a phrase rhyming with the text. Include emojis in the caption.
|
29 |
|
30 |
Descriptive text: {documents};
|
31 |
Instagram Caption:
|
|
|
46 |
with gr.Row():
|
47 |
image = gr.Image(type="filepath")
|
48 |
with gr.Column():
|
49 |
+
model_name = gr.Dropdown(["mistralai/Mistral-7B-v0.1","OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5", "tiiuae/falcon-7b-instruct", "tiiuae/falcon-7b", "HuggingFaceH4/starchat-beta", "bigscience/bloom", "google/flan-t5-xxl"], value="mistralai/Mistral-7B-v0.1", label="Choose your model!")
|
50 |
gr.Examples(["./whale.png", "./rainbow.jpeg", "./selfie.png"], inputs=image, label="Click on any example")
|
51 |
submit_btn = gr.Button("✨ Captionate ✨")
|
52 |
caption = gr.Textbox(label="Caption", show_copy_button=True)
|