Update app.py
Browse files
app.py
CHANGED
@@ -2,12 +2,13 @@ import streamlit as st
|
|
2 |
from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer
|
3 |
|
4 |
# Load your model and tokenizer from Hugging Face
|
5 |
-
model_name = "
|
6 |
-
|
7 |
-
|
|
|
8 |
|
9 |
# Define the pipeline with your model
|
10 |
-
pipe = pipeline("
|
11 |
|
12 |
text = st.text_area("Enter some text:")
|
13 |
|
|
|
2 |
from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer
|
3 |
|
4 |
# Load your model and tokenizer from Hugging Face
|
5 |
+
model_name = "orYx-models/finetuned-tiny-llama-medical-papers"
|
6 |
+
token = "Tinyllama_secret" # Replace <your_token> with your actual Hugging Face API token
|
7 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name, token=token)
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, token=token)
|
9 |
|
10 |
# Define the pipeline with your model
|
11 |
+
pipe = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
12 |
|
13 |
text = st.text_area("Enter some text:")
|
14 |
|