nagasurendra commited on
Commit
c8164d8
·
verified ·
1 Parent(s): 56a8c4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -19
app.py CHANGED
@@ -46,25 +46,20 @@ custom_html = """
46
  """
47
 
48
  # Gradio interface
49
- def app():
50
- with gr.Blocks() as interface:
51
- with gr.Row():
52
- gr.HTML("<h1>Interactive Form Example</h1>")
53
- with gr.Row():
54
- gr.HTML(custom_html)
55
- with gr.Row():
56
- gr.HTML(custom_script)
57
-
58
- # Map the backend function for JavaScript fetch()
59
- backend_interface = gr.Interface(
60
- fn=process_data,
61
- inputs=["text", "number"],
62
- outputs="text"
63
- )
64
- interface.append(backend_interface)
65
-
66
- return interface
67
 
 
 
 
 
 
 
68
 
69
  # Launch the app
70
- app().launch()
 
46
  """
47
 
48
  # Gradio interface
49
+ with gr.Blocks() as app:
50
+ with gr.Row():
51
+ gr.HTML("<h1>Interactive Form Example</h1>")
52
+ with gr.Row():
53
+ gr.HTML(custom_html)
54
+ with gr.Row():
55
+ gr.HTML(custom_script)
 
 
 
 
 
 
 
 
 
 
 
56
 
57
+ # Gradio Interface for the backend function
58
+ interface = gr.Interface(
59
+ fn=process_data,
60
+ inputs=["text", "number"],
61
+ outputs="text"
62
+ )
63
 
64
  # Launch the app
65
+ interface.launch()