VjPower commited on
Commit
104daa7
1 Parent(s): 3d1607e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- import streamlit as lt
2
  import openai
3
  from dotenv import load_dotenv
4
  import os
@@ -32,6 +32,22 @@ Give Overall rating and verdict for if the candidate has to be considered for ne
32
 
33
  if __name__=="__main__":
34
  iContent=st.text_area("Enter Transcript")
35
- answer= get_chat_completion(iContent)
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  json_answer={'feedback':answer}
37
  st.json(json_answer)
 
 
 
 
1
+ import streamlit as st
2
  import openai
3
  from dotenv import load_dotenv
4
  import os
 
32
 
33
  if __name__=="__main__":
34
  iContent=st.text_area("Enter Transcript")
35
+
36
+ uploaded_file = st.file_uploader("Upload a file", type=["txt", "docx"])
37
+
38
+ if iContent and uploaded_file:
39
+ content= uploaded_file.read()
40
+ st.code(file_contents, language="txt")
41
+ answer= get_chat_completion(content)
42
+ elif iContent:
43
+ answer= get_chat_completion(iContent)
44
+ elif uploaded_file:
45
+ content= uploaded_file.read()
46
+ st.code(file_contents, language="txt")
47
+ answer= get_chat_completion(content)
48
+
49
  json_answer={'feedback':answer}
50
  st.json(json_answer)
51
+
52
+
53
+