sabssag commited on
Commit
d71e035
·
verified ·
1 Parent(s): c6658e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,13 +2,13 @@ import streamlit as st
2
  from transformers import pipeline
3
 
4
  # Define the path to the saved model
5
- model_path = './QAModel' # Path to your fine-tuned model
6
 
7
  # Load the question-answering pipeline
8
  qa_pipeline = pipeline("question-answering", model=model_path, tokenizer=model_path)
9
 
10
  # Load the context from a file
11
- context_file = 'context.txt' # Replace with your context file path
12
 
13
  with open(context_file, 'r', encoding='utf-8') as f:
14
  default_context = f.read()
 
2
  from transformers import pipeline
3
 
4
  # Define the path to the saved model
5
+ model_path = './QAModel'
6
 
7
  # Load the question-answering pipeline
8
  qa_pipeline = pipeline("question-answering", model=model_path, tokenizer=model_path)
9
 
10
  # Load the context from a file
11
+ context_file = 'contexts.txt'
12
 
13
  with open(context_file, 'r', encoding='utf-8') as f:
14
  default_context = f.read()