Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -174,7 +174,7 @@ def insert_data(extracted_details):
|
|
174 |
except Exception as ex:
|
175 |
logger.error(f"Error inserting data: {ex}")
|
176 |
|
177 |
-
llm = Llama(model_path='./
|
178 |
|
179 |
def read_email():
|
180 |
df = pd.read_csv('./emails.csv')
|
@@ -184,7 +184,7 @@ def read_email():
|
|
184 |
|
185 |
print("*"*50)
|
186 |
t = output['choices'][0]['text']
|
187 |
-
extracted_details = json.loads(t[t.find('{'):t.find('}')+1])
|
188 |
# print(extracted_details)
|
189 |
print(type(extracted_details))
|
190 |
meta_data = {
|
|
|
174 |
except Exception as ex:
|
175 |
logger.error(f"Error inserting data: {ex}")
|
176 |
|
177 |
+
llm = Llama(model_path='./Phi-3-mini-4k-instruct-gguf', n_ctx=2048)
|
178 |
|
179 |
def read_email():
|
180 |
df = pd.read_csv('./emails.csv')
|
|
|
184 |
|
185 |
print("*"*50)
|
186 |
t = output['choices'][0]['text']
|
187 |
+
extracted_details = json.loads(t[t.find('{'):t.find('}')+1].replace("'", '"'))
|
188 |
# print(extracted_details)
|
189 |
print(type(extracted_details))
|
190 |
meta_data = {
|