Spaces:
Runtime error
Runtime error
VishalMysore
commited on
Commit
β’
e960cef
1
Parent(s):
39f1e00
Update app.py
Browse files
app.py
CHANGED
@@ -126,6 +126,7 @@ def createQuestions(documents):
|
|
126 |
|
127 |
return questions
|
128 |
def detect(context, summary):
|
|
|
129 |
score = mqag_model.score(candidate=summary, reference=context, num_questions=3, verbose=True)
|
130 |
return score
|
131 |
|
@@ -148,6 +149,7 @@ def summarize(document):
|
|
148 |
)
|
149 |
return response.choices[0].message.content
|
150 |
def detectRag(document,rags):
|
|
|
151 |
options = sorted([word.capitalize() for word in rags.split(",")])
|
152 |
print(options)
|
153 |
questions = [{'question': "what is the main topic of this?", 'options': options}]
|
|
|
126 |
|
127 |
return questions
|
128 |
def detect(context, summary):
|
129 |
+
print(summary)
|
130 |
score = mqag_model.score(candidate=summary, reference=context, num_questions=3, verbose=True)
|
131 |
return score
|
132 |
|
|
|
149 |
)
|
150 |
return response.choices[0].message.content
|
151 |
def detectRag(document,rags):
|
152 |
+
print(rags)
|
153 |
options = sorted([word.capitalize() for word in rags.split(",")])
|
154 |
print(options)
|
155 |
questions = [{'question': "what is the main topic of this?", 'options': options}]
|