Spaces:
Runtime error
Runtime error
Commit
·
46d20c8
1
Parent(s):
192d9af
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,14 +37,14 @@ def bot(history):
|
|
| 37 |
########## LOADING PRE-COMPUTED EMBEDDINGS ##########
|
| 38 |
class_embeddings = pd.read_csv('Embeddings/MainClassEmbeddings.csv')
|
| 39 |
|
| 40 |
-
def classifier(userin
|
| 41 |
clean_in = classification.clean_data(userin, type='String')
|
| 42 |
in_emb = classification.sentence_embedder(clean_in, 'Model_bert')
|
| 43 |
|
| 44 |
Number = 10
|
| 45 |
broad_scope_predictions = classification.broad_scope_class_predictor(class_embeddings, in_emb, Number, Sensitivity='High')
|
| 46 |
|
| 47 |
-
return broad_scope_predictions[1]
|
| 48 |
|
| 49 |
|
| 50 |
|
|
@@ -131,7 +131,7 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
| 131 |
Use this tool to expand your patent claim into a description. You can also use this tool to generate abstracts and give you ideas about the benefit of an invention by changing the settings in the dropdown menu.
|
| 132 |
|
| 133 |
""")
|
| 134 |
-
|
| 135 |
with gr.Row(scale=1, min_width=600):
|
| 136 |
|
| 137 |
text1 = gr.Textbox(label="Input",
|
|
@@ -178,7 +178,7 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
| 178 |
Click on the link to initiate either an Espacenet or Google Patents classification search using the generated classifications. You can specify which you would like using the dropdown menu.
|
| 179 |
""")
|
| 180 |
|
| 181 |
-
|
| 182 |
with gr.Row(scale=1, min_width=600):
|
| 183 |
userin = gr.Textbox(label="Input",
|
| 184 |
placeholder='Type in your Claim/Description/Abstract Here')
|
|
@@ -200,7 +200,7 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
| 200 |
""")
|
| 201 |
|
| 202 |
|
| 203 |
-
chatbot = gr.Chatbot([], elem_id="Claimed Assistant").style(height=
|
| 204 |
with gr.Row():
|
| 205 |
with gr.Column(scale=0.85):
|
| 206 |
txt = gr.Textbox(
|
|
|
|
| 37 |
########## LOADING PRE-COMPUTED EMBEDDINGS ##########
|
| 38 |
class_embeddings = pd.read_csv('Embeddings/MainClassEmbeddings.csv')
|
| 39 |
|
| 40 |
+
def classifier(userin):
|
| 41 |
clean_in = classification.clean_data(userin, type='String')
|
| 42 |
in_emb = classification.sentence_embedder(clean_in, 'Model_bert')
|
| 43 |
|
| 44 |
Number = 10
|
| 45 |
broad_scope_predictions = classification.broad_scope_class_predictor(class_embeddings, in_emb, Number, Sensitivity='High')
|
| 46 |
|
| 47 |
+
return broad_scope_predictions[1]
|
| 48 |
|
| 49 |
|
| 50 |
|
|
|
|
| 131 |
Use this tool to expand your patent claim into a description. You can also use this tool to generate abstracts and give you ideas about the benefit of an invention by changing the settings in the dropdown menu.
|
| 132 |
|
| 133 |
""")
|
| 134 |
+
gr.Dropdown(["Generate Description", "Generate Abstract", "Benefits of the invention"], label='Choose Generation Type Here')
|
| 135 |
with gr.Row(scale=1, min_width=600):
|
| 136 |
|
| 137 |
text1 = gr.Textbox(label="Input",
|
|
|
|
| 178 |
Click on the link to initiate either an Espacenet or Google Patents classification search using the generated classifications. You can specify which you would like using the dropdown menu.
|
| 179 |
""")
|
| 180 |
|
| 181 |
+
gr.Dropdown(["Google Patent Search", "Espacenet Patent Search"], label='Choose Search Type Here')
|
| 182 |
with gr.Row(scale=1, min_width=600):
|
| 183 |
userin = gr.Textbox(label="Input",
|
| 184 |
placeholder='Type in your Claim/Description/Abstract Here')
|
|
|
|
| 200 |
""")
|
| 201 |
|
| 202 |
|
| 203 |
+
chatbot = gr.Chatbot([], elem_id="Claimed Assistant").style(height=500)
|
| 204 |
with gr.Row():
|
| 205 |
with gr.Column(scale=0.85):
|
| 206 |
txt = gr.Textbox(
|