Adding a disclaimer on top
Browse files
app.py
CHANGED
@@ -102,13 +102,33 @@ def generate_response(user_query, top_k=5):
|
|
102 |
return recommendations
|
103 |
|
104 |
# Create Gradio interface
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
# Launch the app
|
114 |
-
iface.launch(share=True)
|
|
|
102 |
return recommendations
|
103 |
|
104 |
# Create Gradio interface
|
105 |
+
with gr.Blocks() as iface:
|
106 |
+
gr.Markdown("# LeetCode Problem Assistant")
|
107 |
+
|
108 |
+
disclaimer = gr.Textbox(
|
109 |
+
value="• This is purely for Educational purpose only. We don't claim ownership of Problem statement\n"
|
110 |
+
"• Copyright of problems and contents goes to Leetcode. Leetcode was not scraped as per terms.\n"
|
111 |
+
"• Do not rely solely on this tool for interview preparation.\n"
|
112 |
+
"• Always verify information with official LeetCode resources.",
|
113 |
+
label="Disclaimer",
|
114 |
+
interactive=False
|
115 |
+
)
|
116 |
+
|
117 |
+
query_input = gr.Textbox(
|
118 |
+
lines=2,
|
119 |
+
placeholder="Enter your natural language query about LeetCode problems...",
|
120 |
+
label="Your Query"
|
121 |
+
)
|
122 |
+
|
123 |
+
output = gr.Textbox(label="Search Results")
|
124 |
+
|
125 |
+
submit_button = gr.Button("Search")
|
126 |
+
|
127 |
+
submit_button.click(
|
128 |
+
fn=generate_response,
|
129 |
+
inputs=query_input,
|
130 |
+
outputs=output
|
131 |
+
)
|
132 |
|
133 |
# Launch the app
|
134 |
+
iface.launch(share=True)
|