RashiAgarwal commited on
Commit
5c0dd13
1 Parent(s): 7c44a2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,11 +26,11 @@ def inference(prompt):
26
  result = pipe(f"<s>[INST] {prompt} [/INST]")
27
  return result[0]['generated_text']
28
 
29
- INTERFACE = gr.Interface(fn=inference, inputs=[gr.Textbox(label= "Prompt", value= 'Please write about Shakuntala Devi')],
30
 
31
  outputs=gr.Text(label= "Generated Text"), title="Phi-2 fine-tuned with OpenAssistant/oasst-1 dataset using QLoRA strategy",
32
 
33
- examples = [['Write a note on Indiana Jones'],]
34
  ).launch(debug=True)
35
 
36
  # with gr.Blocks() as demo:
@@ -43,7 +43,7 @@ INTERFACE = gr.Interface(fn=inference, inputs=[gr.Textbox(label= "Prompt", value
43
  # prompt = gr.Textbox(label="Prompt")
44
  # output = gr.Textbox(label="Output Box")
45
  # greet_btn = gr.Button("Generate")
46
- # examples = gr.Examples(examples=[[prompt = 'Please write about Shakuntala Devi'], [prompt = 'Write a brief note on Indiana Jones']], cache_examples=False)
47
  # greet_btn.click(fn=inference, inputs=prompt, outputs=output)
48
 
49
  # demo.launch(debug=True)
 
26
  result = pipe(f"<s>[INST] {prompt} [/INST]")
27
  return result[0]['generated_text']
28
 
29
+ INTERFACE = gr.Interface(fn=inference, inputs=[gr.Textbox(label= "Prompt", value= 'write a note on Albert Einstein')],
30
 
31
  outputs=gr.Text(label= "Generated Text"), title="Phi-2 fine-tuned with OpenAssistant/oasst-1 dataset using QLoRA strategy",
32
 
33
+ examples = [['Tell me about Amitabh Bachchan'],]
34
  ).launch(debug=True)
35
 
36
  # with gr.Blocks() as demo:
 
43
  # prompt = gr.Textbox(label="Prompt")
44
  # output = gr.Textbox(label="Output Box")
45
  # greet_btn = gr.Button("Generate")
46
+ # examples = gr.Examples(examples=['write a note on Shakuntala Devi'], ['Tell me about Amitabh Bachchan'], inputs = [prompt], cache_examples=False)
47
  # greet_btn.click(fn=inference, inputs=prompt, outputs=output)
48
 
49
  # demo.launch(debug=True)