Trista Yao commited on
Commit
4d5c1ca
·
1 Parent(s): 3f88b2b

try example

Browse files
Files changed (1) hide show
  1. app.py +54 -30
app.py CHANGED
@@ -1,38 +1,62 @@
1
  import streamlit as st
 
 
2
 
3
- st.set_page_config(page_title="Resume Refinement Tool", layout="wide")
4
 
5
- st.title("ResumeTailor")
6
- st.write("Optimize your resume for specific job descriptions")
7
 
8
- col1, col2 = st.columns(2)
9
 
10
- with col1:
11
- st.header("Inputs")
12
- resume_text = st.text_area(
13
- "Paste your resume work experience here",
14
- height=300,
15
- placeholder="Describe your work experience..."
16
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
- job_description = st.text_area(
19
- "Paste the job description here",
20
- height=300,
21
- placeholder="Paste the job requirements..."
22
- )
23
 
24
- if st.button("Refine Resume", type="primary"):
25
- # Here you would call your model
26
- refined_resume = "This would be the refined resume after model processing"
27
- similarity_score = 0.85 # Example score
28
 
29
- with col2:
30
- st.header("Results")
31
- st.text_area("Refined Work Experience", value=refined_resume, height=300)
32
- st.metric("JD Similarity Score", f"{similarity_score:.2f}")
33
-
34
- # st.download_button(
35
- # "Download Refined Resume",
36
- # refined_resume,
37
- # file_name="refined_resume.txt"
38
- # )
 
1
  import streamlit as st
2
+ from transformers import pipeline
3
+ from PIL import Image
4
 
5
+ pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
6
 
7
+ st.title("Hot Dog? Or Not?")
 
8
 
9
+ file_name = st.file_uploader("Upload a hot dog candidate image")
10
 
11
+ if file_name is not None:
12
+ col1, col2 = st.columns(2)
13
+
14
+ image = Image.open(file_name)
15
+ col1.image(image, use_column_width=True)
16
+ predictions = pipeline(image)
17
+
18
+ col2.header("Probabilities")
19
+ for p in predictions:
20
+ col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")
21
+
22
+
23
+
24
+
25
+ # import streamlit as st
26
+
27
+ # st.set_page_config(page_title="Resume Refinement Tool", layout="wide")
28
+
29
+ # st.title("ResumeTailor")
30
+ # st.write("Optimize your resume for specific job descriptions")
31
+
32
+ # col1, col2 = st.columns(2)
33
+
34
+ # with col1:
35
+ # st.header("Inputs")
36
+ # resume_text = st.text_area(
37
+ # "Paste your resume work experience here",
38
+ # height=300,
39
+ # placeholder="Describe your work experience..."
40
+ # )
41
 
42
+ # job_description = st.text_area(
43
+ # "Paste the job description here",
44
+ # height=300,
45
+ # placeholder="Paste the job requirements..."
46
+ # )
47
 
48
+ # if st.button("Refine Resume", type="primary"):
49
+ # # Here you would call your model
50
+ # refined_resume = "This would be the refined resume after model processing"
51
+ # similarity_score = 0.85 # Example score
52
 
53
+ # with col2:
54
+ # st.header("Results")
55
+ # st.text_area("Refined Work Experience", value=refined_resume, height=300)
56
+ # st.metric("JD Similarity Score", f"{similarity_score:.2f}")
57
+
58
+ # # st.download_button(
59
+ # # "Download Refined Resume",
60
+ # # refined_resume,
61
+ # # file_name="refined_resume.txt"
62
+ # # )