Spaces:
Runtime error
Runtime error
Commit
·
8373fbf
1
Parent(s):
657cae4
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def bot(history):
|
|
30 |
history[-1][1] = response
|
31 |
return history
|
32 |
|
33 |
-
|
34 |
########## LOADING PRE-COMPUTED EMBEDDINGS ##########
|
35 |
class_embeddings = pd.read_csv('Embeddings/MainClassEmbeddings.csv')
|
36 |
|
@@ -44,6 +44,7 @@ def classifier(userin, SearchType):
|
|
44 |
|
45 |
return broad_scope_predictions[1], searchlink
|
46 |
|
|
|
47 |
|
48 |
def generateresponse(history, task):
|
49 |
"""
|
@@ -167,6 +168,7 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
167 |
# placeholder='Type in your idea here!')
|
168 |
# text2 = gr.Textbox(label="Output")
|
169 |
|
|
|
170 |
with gr.Tab("CPC Search Tool"):
|
171 |
gr.Markdown("""
|
172 |
Use this tool to classify your invention according to the Cooperative Patent Classification system.
|
@@ -181,7 +183,7 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
181 |
output = gr.Textbox(label="Output")
|
182 |
with gr.Row():
|
183 |
classify_btn = gr.Button("Classify")
|
184 |
-
classify_btn.click(fn=classifier, inputs=[userin, SearchType] , outputs=output)
|
185 |
|
186 |
|
187 |
gr.Markdown("""
|
|
|
30 |
history[-1][1] = response
|
31 |
return history
|
32 |
|
33 |
+
'''
|
34 |
########## LOADING PRE-COMPUTED EMBEDDINGS ##########
|
35 |
class_embeddings = pd.read_csv('Embeddings/MainClassEmbeddings.csv')
|
36 |
|
|
|
44 |
|
45 |
return broad_scope_predictions[1], searchlink
|
46 |
|
47 |
+
'''
|
48 |
|
49 |
def generateresponse(history, task):
|
50 |
"""
|
|
|
168 |
# placeholder='Type in your idea here!')
|
169 |
# text2 = gr.Textbox(label="Output")
|
170 |
|
171 |
+
|
172 |
with gr.Tab("CPC Search Tool"):
|
173 |
gr.Markdown("""
|
174 |
Use this tool to classify your invention according to the Cooperative Patent Classification system.
|
|
|
183 |
output = gr.Textbox(label="Output")
|
184 |
with gr.Row():
|
185 |
classify_btn = gr.Button("Classify")
|
186 |
+
#classify_btn.click(fn=classifier, inputs=[userin, SearchType] , outputs=output)
|
187 |
|
188 |
|
189 |
gr.Markdown("""
|