manamisdiz's picture
Add application file
a1e0e22
raw
history blame
623 Bytes
import streamlit as st
from transformers import pipeline
print ("Loading model....")
#Title and Description
st.title("programming language identification")
st.write("""
### Powered bu Hugging Face and Streamlit
This app uses a pre-trained model from Hugging Face to identificate programming language.
Enter a programming language to determine what language it is!
""")
#Initialize Hugging Face Language identification pipeline
@st.cache_resource
def load_model():
print("before load model")
return pipeline("text-classification", model="huggingface/CodeBERTa-language-id")
language_identificator = load_model()