MCS12 commited on
Commit
e461154
·
verified ·
1 Parent(s): aea91a5

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -71,7 +71,7 @@ class EndpointHandler:
71
  do_sample=True,
72
  repetition_penalty=1.15,
73
  )
74
-
75
  available_tags = ["presentation", "slide", "ul", "ol", "li", "h1", "h2", "h3", "p"]
76
  available_stylings = ["bold", "italic", "underline", "color", "align", "fontSize"]
77
  prediction = self.tokenizer.decode(outputs[0], skip_special_tokens=True)
@@ -111,7 +111,7 @@ class EndpointHandler:
111
 
112
  # Create messages following Llama 3's chat format
113
  messages = [
114
- {"role": "system", "content": f"Summarize the content into presentation slides in XML syntax with following parameters:\n Tone: {tone}\n Length: {length}\n Strictly use only the tags: <presentation>, <slide>, <h1>, <h2>, <p>, <ul>, <ol>, <li> only\n Strictly use only the available formatting: bold='True'/'False', italic='True'/'False', underline='True'/'False', color='red'/'green'/'yellow'/'blue', alight='left'/'center'/'right', fontSize=integer"},
115
  {"role": "user", "content": content}
116
  ]
117
 
 
71
  do_sample=True,
72
  repetition_penalty=1.15,
73
  )
74
+
75
  available_tags = ["presentation", "slide", "ul", "ol", "li", "h1", "h2", "h3", "p"]
76
  available_stylings = ["bold", "italic", "underline", "color", "align", "fontSize"]
77
  prediction = self.tokenizer.decode(outputs[0], skip_special_tokens=True)
 
111
 
112
  # Create messages following Llama 3's chat format
113
  messages = [
114
+ {"role": "system", "content": f"Summarize the content into presentation slides in XML syntax with following parameters:\n Tone: {tone}\n Length: {length}\n Strictly use only the tags: <presentation>, <slide>, <h1>, <h2>, <p>, <ul>, <ol>, <li> only\n Strictly use only the available formatting: bold='true'/'false', italic='true'/'false', underline='true'/'false', color='red'/'green'/'yellow'/'blue', alight='left'/'center'/'right', fontSize=integer"},
115
  {"role": "user", "content": content}
116
  ]
117