Vineedhar commited on
Commit
9a228a9
1 Parent(s): cb049be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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 = "Vineedhar/Medical_papers_inference_TinyLLama"
6
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
7
- tokenizer = AutoTokenizer.from_pretrained(model_name)
 
8
 
9
  # Define the pipeline with your model
10
- pipe = pipeline("Chatbot", model=model, tokenizer=tokenizer)
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