prithivMLmods commited on
Commit
953762b
·
verified ·
1 Parent(s): 0c62060

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -29,12 +29,10 @@ with gr.Blocks() as demo:
29
  value="Meta-Llama-3.2-3B-Instruct" # default value
30
  )
31
 
32
- # Textbox for user input and output
33
  input_box = gr.Textbox(
34
  label="Input",
35
- placeholder="Ask a question...",
36
- examples=["Explain quantum gravity to a 5-year old.",
37
- "How many R are there in the word Strawberry?"]
38
  )
39
 
40
  # Output for the model's response
@@ -43,6 +41,13 @@ with gr.Blocks() as demo:
43
  # Button to generate the output
44
  generate_button = gr.Button("Generate Response")
45
 
 
 
 
 
 
 
 
46
  # Action when button is clicked
47
  def generate_response(model_choice, user_input):
48
  model = load_model(model_choice)
 
29
  value="Meta-Llama-3.2-3B-Instruct" # default value
30
  )
31
 
32
+ # Textbox for user input
33
  input_box = gr.Textbox(
34
  label="Input",
35
+ placeholder="Ask a question..."
 
 
36
  )
37
 
38
  # Output for the model's response
 
41
  # Button to generate the output
42
  generate_button = gr.Button("Generate Response")
43
 
44
+ # Add example inputs
45
+ examples = gr.Examples(
46
+ examples=["Explain quantum gravity to a 5-year old.",
47
+ "How many R are there in the word Strawberry?"],
48
+ inputs=input_box
49
+ )
50
+
51
  # Action when button is clicked
52
  def generate_response(model_choice, user_input):
53
  model = load_model(model_choice)