skolvankar commited on
Commit
d642165
·
1 Parent(s): 2b9215e

Add application file

Browse files
Files changed (1) hide show
  1. app.py +20 -9
app.py CHANGED
@@ -92,12 +92,23 @@ def recommend_courses(user_skills):
92
 
93
  return table
94
 
95
- # Gradio interface
96
- iface = gr.Interface(
97
- fn=recommend_courses,
98
- inputs="text",
99
- outputs="html",
100
- title = "COURSE Recommendation Chatbot: SWAYAM",
101
- live=True,
102
- )
103
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
  return table
94
 
95
+
96
+ def greet(name):
97
+ return "Hello " + name + "!"
98
+
99
+
100
+ with gr.Blocks() as demo:
101
+ name = gr.Textbox(label="Enter any skill")
102
+ greet_btn = gr.Button("Submit")
103
+ greet_btn.click(fn=recommend_courses, inputs=name, outputs="html", api_name="recommend_courses")
104
+
105
+ # demo.launch()
106
+ # # Gradio interface
107
+ # iface = gr.Interface(
108
+ # fn=recommend_courses,
109
+ # inputs="text",
110
+ # outputs="html",
111
+ # title = "COURSE Recommendation Chatbot: SWAYAM",
112
+ # live=True,
113
+ # )
114
+ iface.launch(share=True)