suhyun.kang commited on
Commit
e4bf3a0
1 Parent(s): 3c495cc
Files changed (1) hide show
  1. response.py +2 -0
response.py CHANGED
@@ -19,6 +19,7 @@ class Category(enum.Enum):
19
  TRANSLATE = "Translate"
20
 
21
 
 
22
  def get_instruction(category, source_lang, target_lang):
23
  if category == Category.SUMMARIZE.value:
24
  return "Summarize the following text in its original language."
@@ -37,6 +38,7 @@ def response_generator(response: str):
37
  yield character
38
 
39
 
 
40
  def get_responses(user_prompt, category, source_lang, target_lang):
41
  if not category:
42
  raise gr.Error("Please select a category.")
 
19
  TRANSLATE = "Translate"
20
 
21
 
22
+ # TODO(#31): Let the model builders set the instruction.
23
  def get_instruction(category, source_lang, target_lang):
24
  if category == Category.SUMMARIZE.value:
25
  return "Summarize the following text in its original language."
 
38
  yield character
39
 
40
 
41
+ # TODO(#29): Return results simultaneously to prevent bias from generation speed.
42
  def get_responses(user_prompt, category, source_lang, target_lang):
43
  if not category:
44
  raise gr.Error("Please select a category.")