gokaygokay commited on
Commit
0861504
1 Parent(s): d2aa469

delete models

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -342,7 +342,7 @@ class HuggingFaceInferenceNode:
342
 
343
  print(f"Prompt saved to {filename}")
344
 
345
- def generate(self, model, input_text, happy_talk, compress, compression_level, poster, custom_base_prompt=""):
346
  try:
347
  default_happy_prompt = """Create a detailed visually descriptive caption of this description, which will be used as a prompt for a text to image AI system (caption only, no instructions like "create an image").Remove any mention of digital artwork or artwork style. Give detailed visual descriptions of the character(s), including ethnicity, skin tone, expression etc. Imagine using keywords for a still for someone who has aphantasia. Describe the image style, e.g. any photographic or art styles / techniques utilized. Make sure to fully describe all aspects of the cinematography, with abundant technical details and visual descriptions. If there is more than one image, combine the elements and characters from all of the images creatively into a single cohesive composition with a single background, inventing an interaction between the characters. Be creative in combining the characters into a single cohesive scene. Focus on two primary characters (or one) and describe an interesting interaction between them, such as a hug, a kiss, a fight, giving an object, an emotional reaction / interaction. If there is more than one background in the images, pick the most appropriate one. Your output is only the caption itself, no comments or extra formatting. The caption is in a single long paragraph. If you feel the images are inappropriate, invent a new scene / characters inspired by these. Additionally, incorporate a specific movie director's visual style and describe the lighting setup in detail, including the type, color, and placement of light sources to create the desired mood and atmosphere. Always frame the scene, including details about the film grain, color grading, and any artifacts or characteristics specific."""
348
 
@@ -480,7 +480,6 @@ def create_interface():
480
 
481
  with gr.Column(scale=2):
482
  with gr.Accordion("Prompt Generation with LLM", open=False):
483
- model = gr.Dropdown(["Mixtral", "Mistral", "Llama 3", "Mistral-Nemo"], label="Model", value="Llama 3")
484
  happy_talk = gr.Checkbox(label="Happy Talk", value=True)
485
  compress = gr.Checkbox(label="Compress", value=True)
486
  compression_level = gr.Radio(["soft", "medium", "hard"], label="Compression Level", value="hard")
@@ -526,7 +525,7 @@ def create_interface():
526
 
527
  generate_text_button.click(
528
  huggingface_node.generate,
529
- inputs=[model, output, happy_talk, compress, compression_level, poster, custom_base_prompt],
530
  outputs=text_output
531
  )
532
 
 
342
 
343
  print(f"Prompt saved to {filename}")
344
 
345
+ def generate(self, input_text, happy_talk, compress, compression_level, poster, custom_base_prompt=""):
346
  try:
347
  default_happy_prompt = """Create a detailed visually descriptive caption of this description, which will be used as a prompt for a text to image AI system (caption only, no instructions like "create an image").Remove any mention of digital artwork or artwork style. Give detailed visual descriptions of the character(s), including ethnicity, skin tone, expression etc. Imagine using keywords for a still for someone who has aphantasia. Describe the image style, e.g. any photographic or art styles / techniques utilized. Make sure to fully describe all aspects of the cinematography, with abundant technical details and visual descriptions. If there is more than one image, combine the elements and characters from all of the images creatively into a single cohesive composition with a single background, inventing an interaction between the characters. Be creative in combining the characters into a single cohesive scene. Focus on two primary characters (or one) and describe an interesting interaction between them, such as a hug, a kiss, a fight, giving an object, an emotional reaction / interaction. If there is more than one background in the images, pick the most appropriate one. Your output is only the caption itself, no comments or extra formatting. The caption is in a single long paragraph. If you feel the images are inappropriate, invent a new scene / characters inspired by these. Additionally, incorporate a specific movie director's visual style and describe the lighting setup in detail, including the type, color, and placement of light sources to create the desired mood and atmosphere. Always frame the scene, including details about the film grain, color grading, and any artifacts or characteristics specific."""
348
 
 
480
 
481
  with gr.Column(scale=2):
482
  with gr.Accordion("Prompt Generation with LLM", open=False):
 
483
  happy_talk = gr.Checkbox(label="Happy Talk", value=True)
484
  compress = gr.Checkbox(label="Compress", value=True)
485
  compression_level = gr.Radio(["soft", "medium", "hard"], label="Compression Level", value="hard")
 
525
 
526
  generate_text_button.click(
527
  huggingface_node.generate,
528
+ inputs=[output, happy_talk, compress, compression_level, poster, custom_base_prompt],
529
  outputs=text_output
530
  )
531