Spaces:
Running
Running
tanveeshsingh
commited on
Commit
·
4b83871
1
Parent(s):
29efda6
Add Changes
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from collinear import Collinear
|
3 |
import os
|
|
|
4 |
collinear = Collinear(access_token=os.getenv('COLLINEAR_API_KEY'))
|
5 |
|
6 |
def update_inputs(input_style):
|
@@ -15,6 +16,8 @@ def update_inputs(input_style):
|
|
15 |
# Function to judge reliability based on the selected input format
|
16 |
async def judge_reliability(input_style, document, conversation, claim, question, answer):
|
17 |
if input_style == "Conv":
|
|
|
|
|
18 |
outputs= await collinear.judge.veritas.conversation(document,conversation[:-1],conversation[-1])
|
19 |
elif input_style == "NLI":
|
20 |
outputs = await collinear.judge.veritas.natural_language_inference(document,claim)
|
|
|
1 |
import gradio as gr
|
2 |
from collinear import Collinear
|
3 |
import os
|
4 |
+
import json
|
5 |
collinear = Collinear(access_token=os.getenv('COLLINEAR_API_KEY'))
|
6 |
|
7 |
def update_inputs(input_style):
|
|
|
16 |
# Function to judge reliability based on the selected input format
|
17 |
async def judge_reliability(input_style, document, conversation, claim, question, answer):
|
18 |
if input_style == "Conv":
|
19 |
+
conversation = json.loads(conversation)
|
20 |
+
print(conversation)
|
21 |
outputs= await collinear.judge.veritas.conversation(document,conversation[:-1],conversation[-1])
|
22 |
elif input_style == "NLI":
|
23 |
outputs = await collinear.judge.veritas.natural_language_inference(document,claim)
|