Spaces:
Runtime error
Runtime error
Commit
·
b1b3f71
1
Parent(s):
18f4e61
Update app.py
Browse files
app.py
CHANGED
@@ -19,14 +19,11 @@ Place holder alpaca model trained example:
|
|
19 |
Required:
|
20 |
!pip install -q datasets loralib sentencepiece
|
21 |
!pip install -q git+https://github.com/zphang/transformers@c3dc391
|
22 |
-
!pip install -q git+https://github.com/huggingface/peft.git
|
23 |
!pip install bitsandbytes
|
24 |
|
25 |
"""
|
26 |
|
27 |
'''
|
28 |
-
from peft import PeftModel
|
29 |
-
from transformers import LLaMATokenizer, LLaMAForCausalLM, GenerationConfig
|
30 |
|
31 |
tokenizer = LLaMATokenizer.from_pretrained("chavinlo/alpaca-native")
|
32 |
|
@@ -95,9 +92,11 @@ theme = gr.themes.Base(
|
|
95 |
with gr.Blocks(title='Claimed', theme=theme) as demo:
|
96 |
|
97 |
gr.Markdown("""
|
98 |
-
# CLAIMED - A GENERATIVE TOOLKIT FOR PATENT ATTORNEYS
|
|
|
|
|
99 |
|
100 |
-
Welcome to our demo! We've trained Meta's Llama on over 200k entries, with a focus on tasks
|
101 |
|
102 |
Please note that this is for research purposes and shouldn't be used commercially.
|
103 |
|
@@ -105,13 +104,9 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
105 |
|
106 |
""")
|
107 |
|
108 |
-
with gr.Tab("
|
109 |
gr.Markdown("""
|
110 |
-
|
111 |
-
|
112 |
-
Example input: A device to help the visually impaired using proprioception.
|
113 |
-
|
114 |
-
Output:
|
115 |
""")
|
116 |
with gr.Row(scale=1, min_width=600):
|
117 |
text1 = gr.Textbox(label="Input",
|
@@ -120,11 +115,10 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
120 |
|
121 |
with gr.Tab("Description Generator"):
|
122 |
gr.Markdown("""
|
123 |
-
Patent descriptions are loooonggg and boring! You can use this tool to
|
124 |
|
125 |
-
|
|
|
126 |
|
127 |
-
Output:
|
128 |
""")
|
129 |
with gr.Row(scale=1, min_width=600):
|
130 |
|
@@ -134,11 +128,8 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
134 |
|
135 |
with gr.Tab("Knowledge Graph"):
|
136 |
gr.Markdown("""
|
137 |
-
|
138 |
-
|
139 |
-
Example input: A device to help the visually impaired using proprioception.
|
140 |
|
141 |
-
Output:
|
142 |
""")
|
143 |
with gr.Row(scale=1, min_width=600):
|
144 |
text1 = gr.Textbox(label="Input",
|
@@ -194,7 +185,7 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
194 |
""")
|
195 |
|
196 |
|
197 |
-
chatbot = gr.Chatbot([], elem_id="Claimed Assistant").style(height=
|
198 |
with gr.Row():
|
199 |
with gr.Column(scale=0.85):
|
200 |
txt = gr.Textbox(
|
@@ -210,7 +201,6 @@ with gr.Blocks(title='Claimed', theme=theme) as demo:
|
|
210 |
|
211 |
gr.Markdown("""
|
212 |
# HAVE AN IDEA? GET IT CLAIMED
|
213 |
-
|
214 |
|
215 |
In the future, we are looking to expand our model's capabilities further to assist in a range of IP related tasks.
|
216 |
|
|
|
19 |
Required:
|
20 |
!pip install -q datasets loralib sentencepiece
|
21 |
!pip install -q git+https://github.com/zphang/transformers@c3dc391
|
|
|
22 |
!pip install bitsandbytes
|
23 |
|
24 |
"""
|
25 |
|
26 |
'''
|
|
|
|
|
27 |
|
28 |
tokenizer = LLaMATokenizer.from_pretrained("chavinlo/alpaca-native")
|
29 |
|
|
|
92 |
with gr.Blocks(title='Claimed', theme=theme) as demo:
|
93 |
|
94 |
gr.Markdown("""
|
95 |
+
# CLAIMED - A GENERATIVE TOOLKIT FOR PATENT ATTORNEYS
|
96 |
+
|
97 |
+
The patenting process can by incredibly time-consuming and expensive. We're on a mission to change that.
|
98 |
|
99 |
+
Welcome to our demo! We've trained Meta's Llama on over 200k entries, with a focus on tasks related to the intellectual property domain.
|
100 |
|
101 |
Please note that this is for research purposes and shouldn't be used commercially.
|
102 |
|
|
|
104 |
|
105 |
""")
|
106 |
|
107 |
+
with gr.Tab("Claim Drafter"):
|
108 |
gr.Markdown("""
|
109 |
+
Use this tool to turn your idea into a patent claim.
|
|
|
|
|
|
|
|
|
110 |
""")
|
111 |
with gr.Row(scale=1, min_width=600):
|
112 |
text1 = gr.Textbox(label="Input",
|
|
|
115 |
|
116 |
with gr.Tab("Description Generator"):
|
117 |
gr.Markdown("""
|
|
|
118 |
|
119 |
+
Use this tool to expand your patent claim into a description.
|
120 |
+
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.
|
121 |
|
|
|
122 |
""")
|
123 |
with gr.Row(scale=1, min_width=600):
|
124 |
|
|
|
128 |
|
129 |
with gr.Tab("Knowledge Graph"):
|
130 |
gr.Markdown("""
|
131 |
+
Use this tool to
|
|
|
|
|
132 |
|
|
|
133 |
""")
|
134 |
with gr.Row(scale=1, min_width=600):
|
135 |
text1 = gr.Textbox(label="Input",
|
|
|
185 |
""")
|
186 |
|
187 |
|
188 |
+
chatbot = gr.Chatbot([], elem_id="Claimed Assistant").style(height=200)
|
189 |
with gr.Row():
|
190 |
with gr.Column(scale=0.85):
|
191 |
txt = gr.Textbox(
|
|
|
201 |
|
202 |
gr.Markdown("""
|
203 |
# HAVE AN IDEA? GET IT CLAIMED
|
|
|
204 |
|
205 |
In the future, we are looking to expand our model's capabilities further to assist in a range of IP related tasks.
|
206 |
|