VictorSanh commited on
Commit
e9455c6
·
1 Parent(s): 423817f
Files changed (1) hide show
  1. app_dialogue.py +12 -4
app_dialogue.py CHANGED
@@ -31,7 +31,7 @@ API_PATHS = {
31
  }
32
 
33
  SYSTEM_PROMPT = [
34
- """The following is a conversation between a highly knowledgeable and intelligent visual AI assistant, called Assistant, and a human user, called User. In the following interactions, User and Assistant will converse in natural language, and Assistant will answer in a sassy way. Assistant's main purpose is to create memes from user's images. Assistant should be funny, sassy, aloof and sometimes roast people.
35
 
36
  Here's a conversation example:""",
37
  """\nUser:""",
@@ -45,8 +45,8 @@ Here's a conversation example:""",
45
  "\nUser: Roast this person",
46
  "https://i.pinimg.com/564x/98/34/4b/98344b2483bd7c8b71a5c0fed6fe20b6.jpg",
47
  "<end_of_utterance>",
48
- """\nAssistant: Damn your handwritting is pretty awful. But I suppose it must be pretty hard to hold a pen, considering you are a hammerhead shark.<end_of_utterance>""",
49
- "--- The conversation begins:"
50
  ]
51
 
52
  BAN_TOKENS = ( # For documentation puporse. We are not using this list, it is hardcoded inside `idefics_causal_lm.py` inside TGI.
@@ -325,6 +325,8 @@ textbox = gr.Textbox(
325
  container=False,
326
  label="Text input",
327
  scale=6,
 
 
328
  )
329
  with gr.Blocks(title="D", theme=gr.themes.Base()) as demo:
330
  gr.HTML("""<h1 align="center">Meme it</h1>""")
@@ -406,7 +408,13 @@ with gr.Blocks(title="D", theme=gr.themes.Base()) as demo:
406
  # problematic_bttn = gr.Button("Problematic😬")
407
 
408
  with gr.Row():
409
- with gr.Accordion("Advanced settings", open=False, visible=True) as parameter_row:
 
 
 
 
 
 
410
  max_new_tokens = gr.Slider(
411
  minimum=8,
412
  maximum=1024,
 
31
  }
32
 
33
  SYSTEM_PROMPT = [
34
+ """The following is a conversation between a highly knowledgeable and intelligent visual AI assistant, called Assistant, and a human user, called User. In the following interactions, User and Assistant will converse in natural language, and Assistant will answer in a sassy way. Assistant's main purpose is to create memes from user's images. Assistant should be funny, sassy, audacious, mouthy, aloof and sometimes roast people.
35
 
36
  Here's a conversation example:""",
37
  """\nUser:""",
 
45
  "\nUser: Roast this person",
46
  "https://i.pinimg.com/564x/98/34/4b/98344b2483bd7c8b71a5c0fed6fe20b6.jpg",
47
  "<end_of_utterance>",
48
+ """\nAssistant: Damn your handwritting is pretty awful. But I suppose it must be pretty hard to hold a pen, considering you are a hammerhead shark.<end_of_utterance></s>""",
49
+ "The conversation begins:"
50
  ]
51
 
52
  BAN_TOKENS = ( # For documentation puporse. We are not using this list, it is hardcoded inside `idefics_causal_lm.py` inside TGI.
 
325
  container=False,
326
  label="Text input",
327
  scale=6,
328
+ lines=20,
329
+ max_lines=50,
330
  )
331
  with gr.Blocks(title="D", theme=gr.themes.Base()) as demo:
332
  gr.HTML("""<h1 align="center">Meme it</h1>""")
 
408
  # problematic_bttn = gr.Button("Problematic😬")
409
 
410
  with gr.Row():
411
+ with gr.Accordion("Advanced settings", open=True, visible=True) as parameter_row:
412
+ system_prompt = gr.Textbox(
413
+ value=SYSTEM_PROMPT,
414
+ visible=True,
415
+ lines=20,
416
+ max_lines=50,
417
+ )
418
  max_new_tokens = gr.Slider(
419
  minimum=8,
420
  maximum=1024,