Spaces:
Running
Running
Allen Park
commited on
Commit
·
f21f2ed
1
Parent(s):
3328fae
add styling
Browse files
app.py
CHANGED
@@ -34,6 +34,34 @@ ANSWER:
|
|
34 |
Your output should be in JSON FORMAT with the keys "REASONING" and "SCORE":
|
35 |
{{"REASONING": <your reasoning as bullet points>, "SCORE": <your final score>}}
|
36 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
@spaces.GPU()
|
38 |
def model_call(question, document, answer):
|
39 |
device = next(model.parameters()).device
|
@@ -59,5 +87,7 @@ inputs = [
|
|
59 |
gr.Textbox(label="Answer")
|
60 |
]
|
61 |
|
62 |
-
|
|
|
|
|
63 |
demo.launch()
|
|
|
34 |
Your output should be in JSON FORMAT with the keys "REASONING" and "SCORE":
|
35 |
{{"REASONING": <your reasoning as bullet points>, "SCORE": <your final score>}}
|
36 |
"""
|
37 |
+
|
38 |
+
HEADER = """
|
39 |
+
# Patronus Lynx Demo
|
40 |
+
<table bgcolor="#1E2432" cellspacing="0" cellpadding="0" width="450">
|
41 |
+
<tr style="height:50px;">
|
42 |
+
<td style="text-align: center;">
|
43 |
+
<a href="https://www.patronus.ai">
|
44 |
+
<img src="https://cdn.prod.website-files.com/64e655d42d3be60f582d0472/64ede352897bcddbe2d41207_patronusai_final_logo.svg" width="200" height="40" />
|
45 |
+
</a>
|
46 |
+
</td>
|
47 |
+
</tr>
|
48 |
+
</table>
|
49 |
+
<table bgcolor="#1E2432" cellspacing="0" cellpadding="0" width="450">
|
50 |
+
<tr style="height:30px;">
|
51 |
+
<td style="text-align: center;">
|
52 |
+
<a href="https://huggingface.co/stabilityai/TripoSR"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Model_Card-Huggingface-orange" height="20"></a>
|
53 |
+
</td>
|
54 |
+
<td style="text-align: center;">
|
55 |
+
<a href="https://github.com/VAST-AI-Research/TripoSR"><img src="https://postimage.me/images/2024/03/04/GitHub_Logo_White.png" width="100" height="20"></a>
|
56 |
+
</td>
|
57 |
+
<td style="text-align: center; color: white;">
|
58 |
+
<a href="https://arxiv.org/abs/2407.08488"><img src="https://img.shields.io/badge/arXiv-2407.08488-b31b1b.svg" height="20"></a>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
+
</table>
|
62 |
+
**Patronus Lynx** is a state-of-the-art open-source model for hallucination detection.
|
63 |
+
"""
|
64 |
+
|
65 |
@spaces.GPU()
|
66 |
def model_call(question, document, answer):
|
67 |
device = next(model.parameters()).device
|
|
|
87 |
gr.Textbox(label="Answer")
|
88 |
]
|
89 |
|
90 |
+
with gr.Blocks() as demo:
|
91 |
+
gr.Markdown(HEADER)
|
92 |
+
gr.Interface(fn=model_call, inputs=inputs, outputs="text")
|
93 |
demo.launch()
|