Update app.py
Browse files
app.py
CHANGED
@@ -47,25 +47,10 @@ def find_similar_questions(text_input):
|
|
47 |
answer = get_similar_links(query, db, embedding_vector)
|
48 |
return "\n".join(set(answer))
|
49 |
|
50 |
-
|
51 |
-
class Solution(object):
|
52 |
-
def isValid(self, s):
|
53 |
-
stack = []
|
54 |
-
mapping = {")": "(", "}": "{", "]": "["}
|
55 |
-
for char in s:
|
56 |
-
if char in mapping:
|
57 |
-
top_element = stack.pop() if stack else '#'
|
58 |
-
if mapping[char] != top_element:
|
59 |
-
return False
|
60 |
-
else:
|
61 |
-
stack.append(char)
|
62 |
-
return not stack
|
63 |
-
"""
|
64 |
-
ip_textbox = gr.inputs.Textbox(lines=20, label="Enter a Code Example")
|
65 |
-
ip_textbox.value = s_example
|
66 |
iface = gr.Interface(
|
67 |
fn=find_similar_questions,
|
68 |
-
inputs=
|
69 |
outputs=gr.outputs.Textbox(label="Similar Questions on Leetcode"),
|
70 |
title="π DSASearch Engine π€",
|
71 |
description="Find similar questions on Leetcode based on a code example.",
|
|
|
47 |
answer = get_similar_links(query, db, embedding_vector)
|
48 |
return "\n".join(set(answer))
|
49 |
|
50 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
iface = gr.Interface(
|
52 |
fn=find_similar_questions,
|
53 |
+
inputs=gr.inputs.Textbox(lines=20, label="Enter a Code Example From Leetcode"),
|
54 |
outputs=gr.outputs.Textbox(label="Similar Questions on Leetcode"),
|
55 |
title="π DSASearch Engine π€",
|
56 |
description="Find similar questions on Leetcode based on a code example.",
|