prajdabre commited on
Commit
19cbaa3
·
1 Parent(s): 3ad36c9

Instructions added

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -64,10 +64,20 @@ def set_example(task, lang):
64
 
65
  with gr.blocks.Blocks() as block:
66
  input= gr.Textbox(label="Input")
67
- task = gr.Dropdown(["IndicWikiBio", "IndicHeadlineGeneration", "IndicParaprasing", "IndicSentenceSummarization", "IndicQuestionGeneration"], label="Task")
68
  lang = gr.Dropdown(["as","bn", "gu", "hi", "kn", "ml", "mr", "or", "pa", "ta", "te"], label="Language")
69
  generate = gr.Button("Generate")
70
  output = gr.Textbox()
 
 
 
 
 
 
 
 
 
 
71
  task.change(set_example, inputs=[task, lang], outputs=[input, lang])
72
  generate.click(greet, inputs = [input, task, lang], outputs=output)
73
  block.launch()
 
64
 
65
  with gr.blocks.Blocks() as block:
66
  input= gr.Textbox(label="Input")
67
+ task = gr.Dropdown(["IndicWikiBio", "IndicHeadlineGeneration", "IndicParaphrasing", "IndicSentenceSummarization", "IndicQuestionGeneration"], label="Task")
68
  lang = gr.Dropdown(["as","bn", "gu", "hi", "kn", "ml", "mr", "or", "pa", "ta", "te"], label="Language")
69
  generate = gr.Button("Generate")
70
  output = gr.Textbox()
71
+ instructions = gr.HTML("<h1>How to use:</h1><br>\
72
+ 1. This space supports 5 tasks and 11 Indic languages.<br>\
73
+ 2. First select the task from the dropdown box and it will show you an example of Input for Hindi. This default example display will be automated for each language in the future. Choose your language, give your input and then press the generate button. Note the formats for IndicWikiBio and Question generation when testing your own inputs. Also note that if you choose another task then the input will be replaced with the default example for that task.<br>\
74
+ 3. The tasks are:<br>\
75
+ 3.1 IndicWikiBio where the input is a Wikipedia table and the output will be a one sentence biograpy. You should pass the input in the following format: &lt;TAG&gt; key1 &lt;/TAG&gt; value1 &lt;TAG&gt; key2 &lt;/TAG&gt; value2.<br>\
76
+ 3.2 IndicHeadlineGeneration where the input is a document or paragraph the output will be a short title. Copy a paragraph from your favorite news site and get a headline. Dont paste extemely long paragraphs. You have been warned.<br>\
77
+ 3.3 IndicParaphrasing where the input is a sentence and the output is its paraphrase.<br>\
78
+ 3.4 IndicSentenceSummarization where the input is a long sentence and the output is a compact version of that sentence.<br>\
79
+ 3.5 IndicQuestionGeneration where the input is an answer and context and the output is the question that should be asked to get the answer. You should pass the input in the following format: ANSWER [SEP] CONTEXT.\
80
+ ")
81
  task.change(set_example, inputs=[task, lang], outputs=[input, lang])
82
  generate.click(greet, inputs = [input, task, lang], outputs=output)
83
  block.launch()