File size: 722 Bytes
c07af09
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import json

import streamlit as st
from transformers import AutoTokenizer, RobertaForSequenceClassification


with open("config.json") as f:
    cfg = json.loads(f.read())


# @st.cache(allow_output_mutation=True)
# def load_model():
#     tokenizer = AutoTokenizer.from_pretrained(cfg["model_name_or_path"])
#     model = RobertaForSequenceClassification.from_pretrained(cfg["model_name_or_path"])

st.title("RoBERTa Marathi")

# with st.spinner("Loading model..."):
#     generator, tokenizer = load_model()

input_text = st.text_input("Text:")

predict_button = st.button("Predict")

if predict_button:
    with st.spinner("Generating prediction..."):
        # Get prediction here
        st.write("Predicted Label")