Spaces:
Sleeping
Sleeping
File Changes
Browse files- .env +2 -0
- app.py +42 -0
- requirements.txt +56 -0
- transcript.txt +69 -0
.env
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
OPENAI_API_KEY="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"
|
2 |
+
|
app.py
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#USGAE
|
2 |
+
|
3 |
+
|
4 |
+
#python generate_feedback.py <file name>
|
5 |
+
|
6 |
+
|
7 |
+
import openai
|
8 |
+
from dotenv import load_dotenv
|
9 |
+
import os
|
10 |
+
import sys
|
11 |
+
load_dotenv()
|
12 |
+
|
13 |
+
openai.api_key = os.environ.get("OPENAI_API_KEY")
|
14 |
+
file_name=sys.argv[1]
|
15 |
+
|
16 |
+
def get_chat_completion(iContent):
|
17 |
+
conv_list=[{"role":"system", "content":f'''You are the world's best interviewer. The model will be given an interview transcript between interviewer and candidate. Based on job profile given in the title, evaluate candidate and rate the candidate on communications ,technical skills, practical skills and attitude. Give the answer in points and describe each point with the rating. For eg:
|
18 |
+
|
19 |
+
Attitude: Rating out of 10
|
20 |
+
Confidence: Rating out of 10
|
21 |
+
Technical Skills: Rating out of 10
|
22 |
+
Practical skills: Rating out of 10
|
23 |
+
|
24 |
+
Give Overall rating and verdict for if the candidate has to be considered for next round along with above ratings \n
|
25 |
+
{iContent}'''}]
|
26 |
+
|
27 |
+
response = openai.ChatCompletion.create(
|
28 |
+
model="gpt-3.5-turbo-16k",
|
29 |
+
messages=conv_list,
|
30 |
+
temperature=0,
|
31 |
+
# max_tokens=50,
|
32 |
+
# frequency_penalty=0.5,
|
33 |
+
# presence_penalty=0.2,
|
34 |
+
)
|
35 |
+
return response['choices'][0]['message']['content'].strip()
|
36 |
+
|
37 |
+
|
38 |
+
if __name__=="__main__":
|
39 |
+
iContent=st.text_area()
|
40 |
+
answer= get_chat_completion(iContent)
|
41 |
+
json_answer={'feedback':answer}
|
42 |
+
st.json(json_answer)
|
requirements.txt
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
aiohttp==3.8.5
|
2 |
+
aiosignal==1.3.1
|
3 |
+
altair==5.0.1
|
4 |
+
async-timeout==4.0.3
|
5 |
+
attrs==23.1.0
|
6 |
+
blinker==1.6.2
|
7 |
+
cachetools==5.3.1
|
8 |
+
certifi==2023.7.22
|
9 |
+
charset-normalizer==3.2.0
|
10 |
+
click==8.1.7
|
11 |
+
frozenlist==1.4.0
|
12 |
+
gitdb==4.0.10
|
13 |
+
GitPython==3.1.32
|
14 |
+
idna==3.4
|
15 |
+
importlib-metadata==6.8.0
|
16 |
+
Jinja2==3.1.2
|
17 |
+
jsonschema==4.19.0
|
18 |
+
jsonschema-specifications==2023.7.1
|
19 |
+
markdown-it-py==3.0.0
|
20 |
+
MarkupSafe==2.1.3
|
21 |
+
mdurl==0.1.2
|
22 |
+
multidict==6.0.4
|
23 |
+
numpy==1.25.2
|
24 |
+
openai==0.27.8
|
25 |
+
packaging==23.1
|
26 |
+
pandas==2.0.3
|
27 |
+
Pillow==9.5.0
|
28 |
+
protobuf==4.24.1
|
29 |
+
pyarrow==12.0.1
|
30 |
+
pydeck==0.8.0
|
31 |
+
Pygments==2.16.1
|
32 |
+
Pympler==1.0.1
|
33 |
+
python-dateutil==2.8.2
|
34 |
+
python-dotenv==1.0.0
|
35 |
+
pytz==2023.3
|
36 |
+
pytz-deprecation-shim==0.1.0.post0
|
37 |
+
referencing==0.30.2
|
38 |
+
requests==2.31.0
|
39 |
+
rich==13.5.2
|
40 |
+
rpds-py==0.9.2
|
41 |
+
six==1.16.0
|
42 |
+
smmap==5.0.0
|
43 |
+
streamlit==1.25.0
|
44 |
+
tenacity==8.2.3
|
45 |
+
toml==0.10.2
|
46 |
+
toolz==0.12.0
|
47 |
+
tornado==6.3.3
|
48 |
+
tqdm==4.66.1
|
49 |
+
typing_extensions==4.7.1
|
50 |
+
tzdata==2023.3
|
51 |
+
tzlocal==4.3.1
|
52 |
+
urllib3==2.0.4
|
53 |
+
validators==0.21.2
|
54 |
+
watchdog==3.0.0
|
55 |
+
yarl==1.9.2
|
56 |
+
zipp==3.16.2
|
transcript.txt
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Transcript
|
2 |
+
This editable transcript was computer generated and might contain errors. People can also change the text after it was created.
|
3 |
+
Nelson Xavier Britto: So, starting with the first question, How does Java meditation of polymorphism support the principle of oriented programming? And what are their potential pitfalls that you should avoid?
|
4 |
+
Sonal Nikhade: Of the can you please repeat. Okay, I have the okay.
|
5 |
+
Nelson Xavier Britto: Yes. Yes. I am.
|
6 |
+
Sonal Nikhade: Implementation of polymorphism Principles of oops and what potential but falls should be so when we talk about Java polymorphism, it includes Java method overloading and method, overriding that is compiled at compile time. We have Method Overloading where, in the same class, we have methods for different parameters but the method names are same.
|
7 |
+
Sonal Nikhade: And for method overriding that happens at run time. and the one method is in parent class. The other method is in child class the method signature has to be same. The only thing is the return type can be covariant and
|
8 |
+
Nelson Xavier Britto:
|
9 |
+
Sonal Nikhade: And that is already run time.
|
10 |
+
Nelson Xavier Britto: so, in terms of pitfalls to be avoided,
|
11 |
+
Sonal Nikhade:
|
12 |
+
Nelson Xavier Britto: one would be that they should have similar signature.
|
13 |
+
Sonal Nikhade: okay, kind of that. Yeah, so as I said for over writing, so the return type should be covariant. That is the parent return type, whatever it is the Return type should be same or child of the one. that the parent class has return type of, and What is number of parameters would be saying the signature should be same for overriding and for overloading, there can be And number of parameters, that can be used.
|
14 |
+
Sonal Nikhade: Yeah, I think.
|
15 |
+
Nelson Xavier Britto: Moving on to the next question, this will be on microservices. So, how do you handle data consistency across multiple microservices,…
|
16 |
+
Sonal Nikhade: Okay.
|
17 |
+
Nelson Xavier Britto: especially when they relay on different databases?
|
18 |
+
Sonal Nikhade: The reliant different database and we need to handle data consistency across My
|
19 |
+
Sonal Nikhade:
|
20 |
+
Sonal Nikhade: so if I have two different micro service and they do have different to database, why would it have inconsistency? Because both are using different data, right?
|
21 |
+
Nelson Xavier Britto: Okay.
|
22 |
+
Sonal Nikhade: I'm just trying to understand the question.
|
23 |
+
Nelson Xavier Britto: So initially, if you think there will be data consistency on using multiple microservices and different database, you can reason that if you think there won't be any incomes there, there are already consistent. You don't have to Aggregate to it.
|
24 |
+
Nelson Xavier Britto: So you're saying it won't be.
|
25 |
+
Sonal Nikhade: Okay.
|
26 |
+
Nelson Xavier Britto: There won't be any consistency issues when there are separated already.
|
27 |
+
Sonal Nikhade: and until we have a shared data that we are referring to, there shouldn't be an inconsistency.
|
28 |
+
Nelson Xavier Britto: Okay, Moving on to the next question, this would be on even driven system. so, How will you ensure order of processing?
|
29 |
+
Sonal Nikhade: Okay.
|
30 |
+
Nelson Xavier Britto: For events.
|
31 |
+
Sonal Nikhade:
|
32 |
+
Nelson Xavier Britto: That are in the interdependent. How would you process them?
|
33 |
+
Sonal Nikhade: That independent, right. So
|
34 |
+
Nelson Xavier Britto: Sorry interdependent, not independent.
|
35 |
+
Sonal Nikhade: processing of events that are interdependent.
|
36 |
+
Sonal Nikhade: Okay.
|
37 |
+
Sonal Nikhade: So there can be a particular. ID or something, through which we can. determine for example, if in a normal microservice We have correlation ID, which we use it,…
|
38 |
+
00:05:00
|
39 |
+
Nelson Xavier Britto: Okay.
|
40 |
+
Sonal Nikhade: when the request is initiated till the end. So, if I want to determine that request uniquely, then to trace that, or to track that, I have that correlation ID that I can use to check for that particular request. Similarly, there would be something in this as well through which we can identify the Particular request and based on that. the interdependent events can verify, if they are working on the same request or not.
|
41 |
+
Nelson Xavier Britto: Got it. So, moving on to Mongo Explain how MongoDB handles. Horizontal scaling.
|
42 |
+
Sonal Nikhade: Horizontal scaling. so,
|
43 |
+
Sonal Nikhade: it creates kind of replicas or of the databases so that even if one of it fails then we have the replica of it So there is no data loss in that case, we can use the data from the replica replicated or the other this thing and I think I got moved it. so when we have multiple instances on these servers of these, same What So, if my application is deployed on one of the instances and I am creating multiple instances. So that is what it is a horizontal scaling, similarly, when we talk about MongoDB as well, so we have that particular dB to be replicated.
|
44 |
+
Sonal Nikhade: and whatever number of times that we decide on as per the usage,
|
45 |
+
Nelson Xavier Britto: We want to question in springboard, while scaling an application, what are some of the performance considerations you take into account?
|
46 |
+
Sonal Nikhade: some performance considerations Take into account.
|
47 |
+
Sonal Nikhade: So when we are scaling an application then, just the way I said, if we have application on one instance, and I am multiplying those instances, then if I am using any data from the database, so then there can be instance, inconsistency, for example, once we had a schedule, which
|
48 |
+
Sonal Nikhade: In a microservice. and we had my two multiple instances for it and that scheduler when it's target used to start. So inside the method, it used to get a fetch a flag from the database and it used to check. So in order to keep it consistent,…
|
49 |
+
Nelson Xavier Britto: Okay.
|
50 |
+
Sonal Nikhade: we used that flag and if the scheduler starts in one and instance, whichever one instance, at the starting. So it is to check that flag. And if the second instance, also starts that scheduler in that case, with that flag, we used to check. So, once they instance picks up that schedulers task and starts running the method, we used to modify the flag. So that whenever other instance picks up and checks the flag, it gets To get the flag as a false. Request to toggle that flag. and then,
|
51 |
+
Nelson Xavier Britto: You're saying this is one. How does it Even I mean what? Performance criteria handles
|
52 |
+
Sonal Nikhade: So duplicacy the same task would have been run One in one instance and another one in second instance, But that we avoided it using the flag over there.
|
53 |
+
Nelson Xavier Britto: Okay. Do you have experience with Kafka using Kafka?
|
54 |
+
Sonal Nikhade: I don't have the experience but yeah, I have Tried few things on my,…
|
55 |
+
Nelson Xavier Britto: Okay.
|
56 |
+
Sonal Nikhade: yeah. On my own.
|
57 |
+
Nelson Xavier Britto: How about reactor will be able to? Maybe say,…
|
58 |
+
Sonal Nikhade: I think I'm comfortable more with Kafka than react.
|
59 |
+
Nelson Xavier Britto: tell involves and
|
60 |
+
Nelson Xavier Britto: okay.
|
61 |
+
Nelson Xavier Britto: describe any use case, where Kafka data durability feature would be very crucial.
|
62 |
+
00:10:00
|
63 |
+
Sonal Nikhade: for example, when we are making a payment Or sick GPA.
|
64 |
+
Nelson Xavier Britto: Okay.
|
65 |
+
Sonal Nikhade: And at times we do get the message saying Server is not done. So it's looks like the Amount or the money has been debited from my account, but it's not yet credited to the receivers account in that. Time maybe because of some server error or some issue internally, but the message that is shown to the user is it would be like we are working on it and it would be resolved in some time. So at that time, Durability like that that is important. we have to have that data wherever we like either we raise it give it back to the sender or with deposit into the receiver but that data has to be there. That is important to
|
66 |
+
Nelson Xavier Britto: These are some questions I had Thanks for ing. Cool. So…
|
67 |
+
Sonal Nikhade: Okay.
|
68 |
+
Nelson Xavier Britto: what I'll be doing is I'll be sharing
|
69 |
+
Meeting ended after 00:11:12 👋
|