MJ commited on
Commit
54d8a35
1 Parent(s): 6a95caa

Updated workflow to include milestone-3

Browse files
.github/workflows/sync_to_huggingface.yaml CHANGED
@@ -1,7 +1,7 @@
1
  name: Sync to Hugging Face Hub
2
  on:
3
  push:
4
- branches: [milestone-2]
5
 
6
  workflow_dispatch:
7
 
@@ -16,4 +16,4 @@ jobs:
16
  - name: Push to hub
17
  env:
18
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
- run: git push https://MJ3128:[email protected]/spaces/MJ3128/CS-GY-6613-Project milestone-2:main
 
1
  name: Sync to Hugging Face Hub
2
  on:
3
  push:
4
+ branches: [milestone-3]
5
 
6
  workflow_dispatch:
7
 
 
16
  - name: Push to hub
17
  env:
18
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
+ run: git push https://MJ3128:[email protected]/spaces/MJ3128/CS-GY-6613-Project milestone-3:main
app.py CHANGED
@@ -8,7 +8,7 @@ if "score" not in st.session_state:
8
  st.session_state.score = ""
9
 
10
 
11
- def run_model(text_in, model_in):
12
  classifier = pipeline(task="sentiment-analysis",
13
  model=model_in)
14
  analysis = classifier(text_in)
@@ -20,14 +20,16 @@ models_available = {"Roberta Large English": "siebert/sentiment-roberta-large-en
20
  "Generic": "Seethal/sentiment_analysis_generic_dataset",
21
  "Twitter Roberta": "cardiffnlp/twitter-roberta-base-sentiment"}
22
 
23
- st.title("Sentiment Analysis Web Application")
24
  text_input = st.text_area(
25
  label="Enter the text to analyze", value="I Love Pizza")
26
  model_picked = st.selectbox(
27
  "Choose a model to run on", options=models_available.keys())
28
 
29
- st.button("Submit", on_click=run_model, args=(
30
  text_input, models_available[model_picked]))
31
 
32
  st.markdown(body="Sentiment: {}, Confidence Score: {} %".format(
33
  st.session_state.sentiment, st.session_state.score))
 
 
 
8
  st.session_state.score = ""
9
 
10
 
11
+ def run_sentiment_model(text_in, model_in):
12
  classifier = pipeline(task="sentiment-analysis",
13
  model=model_in)
14
  analysis = classifier(text_in)
 
20
  "Generic": "Seethal/sentiment_analysis_generic_dataset",
21
  "Twitter Roberta": "cardiffnlp/twitter-roberta-base-sentiment"}
22
 
23
+ st.title("Sentiment Analysis Section (Milestone-2)")
24
  text_input = st.text_area(
25
  label="Enter the text to analyze", value="I Love Pizza")
26
  model_picked = st.selectbox(
27
  "Choose a model to run on", options=models_available.keys())
28
 
29
+ st.button("Submit", on_click=run_sentiment_model, args=(
30
  text_input, models_available[model_picked]))
31
 
32
  st.markdown(body="Sentiment: {}, Confidence Score: {} %".format(
33
  st.session_state.sentiment, st.session_state.score))
34
+
35
+ st.title("Patentability Score Section (Milestone-3)")