LPX55 commited on
Commit
88207ee
·
verified ·
1 Parent(s): d8aa584

Update app_v2.py

Browse files
Files changed (1) hide show
  1. app_v2.py +2 -1
app_v2.py CHANGED
@@ -16,6 +16,7 @@ from peft import PeftModel, PeftConfig
16
  import gradio as gr
17
 
18
  huggingface_token = os.getenv("HUGGINFACE_TOKEN")
 
19
  MAX_SEED = 1000000
20
  MODEL_PATH = "fancyfeast/llama-joycaption-beta-one-hf-llava"
21
  cap_processor = AutoProcessor.from_pretrained(MODEL_PATH)
@@ -181,7 +182,7 @@ with gr.Blocks(title="FLUX Turbo Upscaler", fill_height=True) as iface:
181
  with gr.Accordion("Generation settings", open=False):
182
  system_prompt = gr.Textbox(
183
  lines=4,
184
- value="Write a straightforward caption for this image. Begin with the main subject and medium. Mention pivotal elements—people, objects, scenery—using confident, definite language. Focus on concrete details like color, shape, texture, and spatial relationships. Show how elements interact. Omit mood and speculative wording. If text is present, quote it exactly. Note any watermarks, signatures, or compression artifacts. Never mention what's absent, resolution, or unobservable details. Vary your sentence structure and keep the description concise, without starting with 'This image is…' or similar phrasing.",
185
  label="System Prompt for Captioning",
186
  visible=True # Changed to visible
187
  )
 
16
  import gradio as gr
17
 
18
  huggingface_token = os.getenv("HUGGINFACE_TOKEN")
19
+ sys_prompt = os.getenv("SYS")
20
  MAX_SEED = 1000000
21
  MODEL_PATH = "fancyfeast/llama-joycaption-beta-one-hf-llava"
22
  cap_processor = AutoProcessor.from_pretrained(MODEL_PATH)
 
182
  with gr.Accordion("Generation settings", open=False):
183
  system_prompt = gr.Textbox(
184
  lines=4,
185
+ value=sys_prompt,
186
  label="System Prompt for Captioning",
187
  visible=True # Changed to visible
188
  )