ajinkyakolhe112 commited on
Commit
b4bd918
·
verified ·
1 Parent(s): 94c8d66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -26,19 +26,22 @@ def classify_image(image_filepath):
26
 
27
  import gradio as gr
28
 
29
- def welcome(name):
30
- return f"Welcome to Gradio, {name}!"
31
 
32
  with gr.Blocks(title="Image Classification for 1000 Objects", css=".gradio-container {background:#FFD1DC;}") as demo:
33
  gr.HTML("""<div style="font-family:'Calibri', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:black;">Image Classification for 1000 Objects</div>""")
 
34
  gr.Markdown(
35
  """
36
  # Welcome to Image Classification Demo
37
  Start typing below to see the output.
38
- """)
39
- inp = gr.Textbox(placeholder="What is your name?")
 
 
40
  out = gr.Textbox()
41
- inp.change(welcome, inp, out)
42
 
43
 
44
  with gr.Row():
 
26
 
27
  import gradio as gr
28
 
29
+ def welcome(name, model_details):
30
+ return f"Hello, {name}! Your model details are: {model_details}"
31
 
32
  with gr.Blocks(title="Image Classification for 1000 Objects", css=".gradio-container {background:#FFD1DC;}") as demo:
33
  gr.HTML("""<div style="font-family:'Calibri', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:black;">Image Classification for 1000 Objects</div>""")
34
+
35
  gr.Markdown(
36
  """
37
  # Welcome to Image Classification Demo
38
  Start typing below to see the output.
39
+ """
40
+ )
41
+ inp_name = gr.Textbox(placeholder="What is your name?")
42
+ inp_model_details = gr.Textbox(placeholder="Enter model details")
43
  out = gr.Textbox()
44
+ inp_name.change(welcome, inp_name, inp_model_details, out)
45
 
46
 
47
  with gr.Row():