Rachel Rakov commited on
Commit
dd1a64f
·
1 Parent(s): adec782

Added examples to page

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. eng_to_aslGloss_app.py +10 -3
README.md CHANGED
@@ -8,5 +8,5 @@ sdk_version: 3.40.1
8
  app_file: eng_to_aslGloss_app.py
9
  pinned: false
10
  ---
11
-
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
8
  app_file: eng_to_aslGloss_app.py
9
  pinned: false
10
  ---
11
+ # How to use English to ASL Gloss
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
eng_to_aslGloss_app.py CHANGED
@@ -5,7 +5,7 @@ import os
5
  import tiktoken
6
 
7
 
8
- # Set openAI key
9
  HF_TOKEN = os.getenv("NextStar")
10
 
11
 
@@ -92,14 +92,21 @@ def getASLGloss(testQs):
92
  def main():
93
 
94
  title = "English to ASL Gloss"
95
- description = """Translate English text to ASL Gloss"""
 
 
 
 
 
 
96
 
97
  interface = gr.Interface(
98
  fn=getGlossFromText,
99
  inputs="textbox",
100
  outputs="text",
101
  title = title,
102
- description = description)
 
103
  # examples=[["Every year I buy my dad a gift"], ["I always look forward to the family vacation"],
104
  # ["If I don't travel often, I am sad."]])
105
  interface.launch()
 
5
  import tiktoken
6
 
7
 
8
+ # Set secret key
9
  HF_TOKEN = os.getenv("NextStar")
10
 
11
 
 
92
  def main():
93
 
94
  title = "English to ASL Gloss"
95
+ #description = """Translate English text to ASL Gloss"""
96
+ description = "This program uses GPT4 to translate English text to \
97
+ ASL gloss. This program makes use of prompt engineering to first describe\
98
+ the task it wants GPT4 to complete (along with examples of translations\
99
+ of English text and it's ASL gloss translations), and then providing\
100
+ GPT4 with the English text to translate to ASL_gloss. Using these prompts,\
101
+ GPT4 translates the input text into ASL gloss."
102
 
103
  interface = gr.Interface(
104
  fn=getGlossFromText,
105
  inputs="textbox",
106
  outputs="text",
107
  title = title,
108
+ description = description,
109
+ examples = [[("Every year I buy my dad a gift", "EVERY-YEAR<Ti>, MY DAD GIFT<T>, ME BUY<A>")]])
110
  # examples=[["Every year I buy my dad a gift"], ["I always look forward to the family vacation"],
111
  # ["If I don't travel often, I am sad."]])
112
  interface.launch()