research14 commited on
Commit
98a343b
β€’
1 Parent(s): 88c8251

added LFTK tool to description

Browse files
Files changed (1) hide show
  1. app.py +40 -24
app.py CHANGED
@@ -217,24 +217,32 @@ def llama_strategies_respond(strategy, task_name, task_ling_ent, message, chat_h
217
 
218
  def interface():
219
  with gr.Tab("Linguistic Entities"):
220
- gr.Markdown("""
221
- ## πŸ“œ Step-By-Step Instructions
 
 
 
 
 
 
 
 
 
222
 
223
- - Enter a sentence for three models to process (Vicuna-7b, LLaMA-7b and GPT-3.5).
224
- - If you own an OpenAI API key, select 'Yes' in the dropdown. If you don't own one, select 'No'.
225
- - If you selected 'Yes', enter your OpenAI API Key [Link to your OpenAI keys](https://platform.openai.com/api-keys).
226
- - If you selected 'No', leave the 'OpenAI Key' field blank and continue with the rest.
227
- - Select a Linguistic Entity from the Dropdown or enter a custom one.
228
- - Click 'Submit' to send your inputs to the models.
229
- - To submit a new prompt, repeat all the steps above and click 'Submit' again. Your new prompt should appear on the top of previous ones.
230
 
231
- ### ⏳ After you click 'Submit', the models will take a couple seconds to process your inputs.
232
- ### πŸ€– Then, the models will output the linguistic entity found in your prompt based on your selection!
 
 
 
 
 
233
 
234
- Note: If you get an 'Error' in the gpt-3.5 model, check the following:
235
- - Check that you entered your key correctly without any extra characters.
236
- - If you used a free key, it means you exceeded your quota from the free API Key.
237
- """)
238
 
239
  # Inputs
240
  ling_ents_prompt = gr.Textbox(show_label=False, placeholder="Write a prompt and press enter")
@@ -302,15 +310,23 @@ def interface():
302
  - If you used a free key, it means you exceeded your quota from the free API Key.
303
  """)
304
 
305
- gr.Markdown("""
306
- ### πŸ› οΈ How each Strategy works
307
-
308
- - Strategy 1 - QA-Based Prompting
309
- - The model is prompted with a question-answer format. The input consists of a question, and the model generates a response based on the understanding of the question and its knowledge.
310
- - Strategy 2 - Instruction-Based Prompting
311
- - Involves providing the model with explicit instructions on how to generate a response. Instead of relying solely on context or previous knowledge, the instructions guide the model in generating content that aligns with specific criteria.
312
- - Strategy 3 - Structured Prompting
313
- - Involves presenting information to the model in a structured format, often with defined sections or categories. The model then generates responses following the given structure.
 
 
 
 
 
 
 
 
314
  """)
315
 
316
  # Inputs
 
217
 
218
  def interface():
219
  with gr.Tab("Linguistic Entities"):
220
+ with gr.Row():
221
+ gr.Markdown("""
222
+ ## πŸ“œ Step-By-Step Instructions
223
+
224
+ - Enter a sentence for three models to process (Vicuna-7b, LLaMA-7b and GPT-3.5).
225
+ - If you own an OpenAI API key, select 'Yes' in the dropdown. If you don't own one, select 'No'.
226
+ - If you selected 'Yes', enter your OpenAI API Key [Link to your OpenAI keys](https://platform.openai.com/api-keys).
227
+ - If you selected 'No', leave the 'OpenAI Key' field blank and continue with the rest.
228
+ - Select a Linguistic Entity from the Dropdown or enter a custom one.
229
+ - Click 'Submit' to send your inputs to the models.
230
+ - To submit a new prompt, repeat all the steps above and click 'Submit' again. Your new prompt should appear on the top of previous ones.
231
 
232
+ ### ⏳ After you click 'Submit', the models will take a couple seconds to process your inputs.
233
+ ### πŸ€– Then, the models will output the linguistic entity found in your prompt based on your selection!
 
 
 
 
 
234
 
235
+ Note: If you get an 'Error' in the gpt-3.5 model, check the following:
236
+ - Check that you entered your key correctly without any extra characters.
237
+ - If you used a free key, it means you exceeded your quota from the free API Key.
238
+ """)
239
+
240
+ gr.Markdown("""
241
+ ### πŸ“Š Linguistic Complexity
242
 
243
+ - We use existing tool, [LFTK](https://github.com/brucewlee/lftk?tab=readme-ov-file), to estimate the liguistic complexity of input sentences.
244
+ - For more information regarding the meanings of each feature keyword, please reference their documentation [here](https://docs.google.com/spreadsheets/d/1uXtQ1ah0OL9cmHp2Hey0QcHb4bifJcQFLvYlVIAWWwQ/edit#gid=693915416).
245
+ """)
 
246
 
247
  # Inputs
248
  ling_ents_prompt = gr.Textbox(show_label=False, placeholder="Write a prompt and press enter")
 
310
  - If you used a free key, it means you exceeded your quota from the free API Key.
311
  """)
312
 
313
+ with gr.Column():
314
+ gr.Markdown("""
315
+ ### πŸ› οΈ How each Strategy works
316
+
317
+ - Strategy 1 - QA-Based Prompting
318
+ - The model is prompted with a question-answer format. The input consists of a question, and the model generates a response based on the understanding of the question and its knowledge.
319
+ - Strategy 2 - Instruction-Based Prompting
320
+ - Involves providing the model with explicit instructions on how to generate a response. Instead of relying solely on context or previous knowledge, the instructions guide the model in generating content that aligns with specific criteria.
321
+ - Strategy 3 - Structured Prompting
322
+ - Involves presenting information to the model in a structured format, often with defined sections or categories. The model then generates responses following the given structure.
323
+ """)
324
+
325
+ gr.Markdown("""
326
+ ### πŸ“Š Linguistic Complexity
327
+
328
+ - We use existing tool, [LFTK](https://github.com/brucewlee/lftk?tab=readme-ov-file), to estimate the liguistic complexity of input sentences.
329
+ - For more information regarding the meanings of each feature keyword, please reference their documentation [here](https://docs.google.com/spreadsheets/d/1uXtQ1ah0OL9cmHp2Hey0QcHb4bifJcQFLvYlVIAWWwQ/edit#gid=693915416).
330
  """)
331
 
332
  # Inputs