Spaces:
Running
Running
Trista Yao
commited on
Commit
·
4d5c1ca
1
Parent(s):
3f88b2b
try example
Browse files
app.py
CHANGED
@@ -1,38 +1,62 @@
|
|
1 |
import streamlit as st
|
|
|
|
|
2 |
|
3 |
-
|
4 |
|
5 |
-
st.title("
|
6 |
-
st.write("Optimize your resume for specific job descriptions")
|
7 |
|
8 |
-
|
9 |
|
10 |
-
|
11 |
-
st.
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
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 |
+
# # )
|