Vineedhar commited on
Commit
2695071
1 Parent(s): bc324c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -1,8 +1,15 @@
1
  import streamlit as st
2
- from tranformers import pipeline
3
 
4
- pipe = peipeline("sentiment analysis")
5
- text = st.text_area("enter some text!")
 
 
 
 
 
 
 
6
 
7
  if text:
8
  out = pipe(text)
 
1
  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
 
14
  if text:
15
  out = pipe(text)