Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
@@ -21,7 +21,8 @@ def extracted_data(pages_data):
|
|
21 |
Expected output: remove any dollar symbols {{'Invoice no.': '1001329','Description': 'Office Chair','Quantity': '2','Date': '5/4/2023','Unit price': '1100.00$','Amount': '2200.00$','Total': '2200.00$','Email': 'Santoshvarma0988@gmail.com','Phone number': '9999999999','Address': 'Mumbai, India'}}
|
22 |
"""
|
23 |
prompt_template = PromptTemplate(input_variables=["pages"], template=template)
|
24 |
-
llm = CTransformers(model="llama-2-7b-chat.ggmlv3.q8_0.bin")
|
|
|
25 |
output_text=llm(prompt_template.format(pages=pages_data))
|
26 |
|
27 |
full_response = ''
|
|
|
21 |
Expected output: remove any dollar symbols {{'Invoice no.': '1001329','Description': 'Office Chair','Quantity': '2','Date': '5/4/2023','Unit price': '1100.00$','Amount': '2200.00$','Total': '2200.00$','Email': 'Santoshvarma0988@gmail.com','Phone number': '9999999999','Address': 'Mumbai, India'}}
|
22 |
"""
|
23 |
prompt_template = PromptTemplate(input_variables=["pages"], template=template)
|
24 |
+
llm = CTransformers(model="llama-2-7b-chat.ggmlv3.q8_0.bin",model_type='llama')
|
25 |
+
|
26 |
output_text=llm(prompt_template.format(pages=pages_data))
|
27 |
|
28 |
full_response = ''
|