ZeeAI1 commited on
Commit
02927f4
·
verified ·
1 Parent(s): 07b2671

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,9 +1,12 @@
1
  import streamlit as st
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
 
3
 
4
  st.title("AI Accountant - Prompt-Based ERP Entry")
5
 
6
- model_path = "./finetuned-flan-t5" # update if different path
 
 
7
  tokenizer = AutoTokenizer.from_pretrained(model_path)
8
  model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
9
 
 
1
  import streamlit as st
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
3
+ import os
4
 
5
  st.title("AI Accountant - Prompt-Based ERP Entry")
6
 
7
+ # Fix: absolute path to model directory
8
+ model_path = os.path.abspath("finetuned-flan-t5")
9
+
10
  tokenizer = AutoTokenizer.from_pretrained(model_path)
11
  model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
12