Spaces:
Runtime error
Runtime error
SujanMidatani
commited on
Commit
•
ecc5ce5
1
Parent(s):
c7d68d0
update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def generate_questions(resume,role='',experience=''):
|
|
41 |
role= role,
|
42 |
experience= experience,
|
43 |
questions=10)
|
44 |
-
return prompt
|
45 |
def context_extracter(text):
|
46 |
|
47 |
llm = ChatOpenAI(
|
@@ -112,7 +112,7 @@ def context_extracter(text):
|
|
112 |
)
|
113 |
# chain = LLMChain(llm=llm1, prompt=PROMPT)
|
114 |
chain = create_extraction_chain(llm, schema, encoder_or_encoder_class='json')
|
115 |
-
return
|
116 |
k=gr.Interface(
|
117 |
fn=generate_questions,
|
118 |
inputs=['file','text','text'],
|
|
|
41 |
role= role,
|
42 |
experience= experience,
|
43 |
questions=10)
|
44 |
+
return prompt.split('\n')
|
45 |
def context_extracter(text):
|
46 |
|
47 |
llm = ChatOpenAI(
|
|
|
112 |
)
|
113 |
# chain = LLMChain(llm=llm1, prompt=PROMPT)
|
114 |
chain = create_extraction_chain(llm, schema, encoder_or_encoder_class='json')
|
115 |
+
return chain.predict_and_parse(text=text)['data']
|
116 |
k=gr.Interface(
|
117 |
fn=generate_questions,
|
118 |
inputs=['file','text','text'],
|