I have been trying to deploy my Question Answering model on St Cloud.
As per steps, I pushed the local model contents to github with my folder name as ‘roberta-base’ which has the .bin model and json.config files.
@st.cache(allow_output_mutation=True)
def question_answering():
model_name = "/app/question-answering/roberta-base/"
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
return model
if st.button('Submit'):
context_input = st.session_state.context
question_input = st.session_state.question_default
with st.spinner('Loading Model'):
my_model = question_answering()
tokenizer_path = "/app/question-answering/roberta-base/"
tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
question_answerer = pipeline("question-answering", model=my_model, tokenizer=tokenizer)
result = question_answerer(question=question_input, context=context_input)
st.write(HTML_WRAPPER.format(result['answer']), unsafe_allow_html=True)
>>> OSError: It looks like the config file at '/app/question-answering/roberta-base/config.json' is not a valid JSON file.
Next, you likely need to fix your config.json file. Specifically, the value of _name_or_path key, whose current (and possibly incorrect) value is https://github.com/Ayush1702/ESG-Question-Answering/blob/main/roberta-base/.
The Python version is likely not an issue. To change Python versions, you will have to delete the app, and select the appropriate Python version from the Advanced settings modal before you re-deploy your app:
We still don’t have an update on the GitLFS issue.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.