Spaces:
Sleeping
Sleeping
Commit
·
116dd2d
1
Parent(s):
e97d346
Add application file
Browse files
app.py
CHANGED
@@ -9,4 +9,12 @@ st.write("""
|
|
9 |
### Powered bu Hugging Face and Streamlit
|
10 |
This app uses a pre-trained model from Hugging Face to identificate programming language.
|
11 |
Enter a programming language to determine what language it is!
|
12 |
-
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
### Powered bu Hugging Face and Streamlit
|
10 |
This app uses a pre-trained model from Hugging Face to identificate programming language.
|
11 |
Enter a programming language to determine what language it is!
|
12 |
+
""")
|
13 |
+
|
14 |
+
#Initialize Hugging Face Language identification pipeline
|
15 |
+
@st.cache_resource
|
16 |
+
def load_model():
|
17 |
+
print("before load model")
|
18 |
+
return pipeline("programming-language-identification", model="CodeBERTa-language-id")
|
19 |
+
|
20 |
+
language_identificator = load_model()
|