Dylan commited on
Commit
68fe4b2
·
1 Parent(s): b5b9453

markdown formatting

Browse files
Files changed (2) hide show
  1. agents.py +2 -2
  2. app.py +1 -1
agents.py CHANGED
@@ -71,7 +71,7 @@ def describe_with_voice(state: State):
71
  "private investigator": "You are a Victorian-age detective. Suave and intellectual.",
72
  "shakespearian": "Talk like one of Shakespeare's characters. ",
73
  }
74
- system_prompt = voice_prompts.get(voice, "You are a pirate.") + " Output 5-10 sentences."
75
  messages = [
76
  {
77
  "role": "system",
@@ -99,7 +99,7 @@ def describe_with_voice(state: State):
99
 
100
  description = processor.decode(generation, skip_special_tokens=True)
101
 
102
- formatted_description = f"#{voice.title()}\n{description}"
103
  print(formatted_description)
104
 
105
  # note that the return value is a list
 
71
  "private investigator": "You are a Victorian-age detective. Suave and intellectual.",
72
  "shakespearian": "Talk like one of Shakespeare's characters. ",
73
  }
74
+ system_prompt = voice_prompts.get(voice, "You are a pirate.") + " Output 5-10 sentences. Utilize markdown for dramatic text formatting."
75
  messages = [
76
  {
77
  "role": "system",
 
99
 
100
  description = processor.decode(generation, skip_special_tokens=True)
101
 
102
+ formatted_description = f"## {voice.title()}\n\n{description}"
103
  print(formatted_description)
104
 
105
  # note that the return value is a list
app.py CHANGED
@@ -57,7 +57,7 @@ def create_interface():
57
 
58
  with gr.Column():
59
  caption_output = gr.Textbox(label="Image Caption", lines=4)
60
- description_output = gr.Textbox(label="Voice Descriptions", lines=10)
61
 
62
  submit_button.click(
63
  fn=process_and_display,
 
57
 
58
  with gr.Column():
59
  caption_output = gr.Textbox(label="Image Caption", lines=4)
60
+ description_output = gr.Markdown(label="Voice Descriptions")
61
 
62
  submit_button.click(
63
  fn=process_and_display,