abhicake commited on
Commit
b0d8697
·
verified ·
1 Parent(s): 1369f69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -28,12 +28,11 @@ def search_courses(user_query):
28
  # Get the top 4 courses
29
  top_4_dets = [item[1] for item in similarity_scores[:4]]
30
 
31
- # Get the final result to display to the user
32
  results = []
33
  for i,det in enumerate(top_4_dets,1):
34
  course_info = f"{i}. " \
35
- f"**Course Name**: {det['Course Name']}\n\n" \
36
  f"**Category**: {det['Course Category']}\n\n" \
 
37
  f"**Course URL**: {det['Course Url']}\n\n" \
38
  f"**Description**: {det['Course Description']}\n\n"
39
  results.append(course_info)
@@ -45,7 +44,7 @@ iface = gr.Interface(fn=search_courses,
45
  inputs="text",
46
  outputs="markdown",
47
  title="Course Search with Sentence Transformers",
48
- description="Enter a query to find the 4 top most similar courses to your requirements")
49
 
50
  # Launch the Gradio app
51
- iface.launch(share=True)
 
28
  # Get the top 4 courses
29
  top_4_dets = [item[1] for item in similarity_scores[:4]]
30
 
 
31
  results = []
32
  for i,det in enumerate(top_4_dets,1):
33
  course_info = f"{i}. " \
 
34
  f"**Category**: {det['Course Category']}\n\n" \
35
+ f"**Course Name**: {det['Course Name']}\n\n" \
36
  f"**Course URL**: {det['Course Url']}\n\n" \
37
  f"**Description**: {det['Course Description']}\n\n"
38
  results.append(course_info)
 
44
  inputs="text",
45
  outputs="markdown",
46
  title="Course Search with Sentence Transformers",
47
+ description="Enter a query to find the top 4 most similar courses.")
48
 
49
  # Launch the Gradio app
50
+ iface.launch()