Saibo-backup
commited on
Commit
•
075c5ca
1
Parent(s):
f763bed
use a shorter description
Browse files
app.py
CHANGED
@@ -70,9 +70,9 @@ if __name__ == "__main__":
|
|
70 |
with demo:
|
71 |
gr.Markdown(
|
72 |
"""
|
73 |
-
#
|
74 |
-
This is a demo of how you can constrain the output of a GPT-2 model
|
75 |
-
Here we use a simple JSON grammar to constrain the output of the model
|
76 |
The grammar is defined in `json_minimal.ebnf` and is written in the Extended Backus-Naur Form (EBNF).
|
77 |
Internally, it relies on the library [`transformers-cfg`](https://github.com/epfl-dlab/transformers-CFG).
|
78 |
For demo purpose, gpt2 is used, but you can use much larger models for better performance.
|
|
|
70 |
with demo:
|
71 |
gr.Markdown(
|
72 |
"""
|
73 |
+
# 👻 Transformers-CFG JSON Demo
|
74 |
+
This is a demo of how you can constrain the output of a GPT-2 model to be a valid JSON string.
|
75 |
+
Here we use a simple JSON grammar to constrain the output of the model.
|
76 |
The grammar is defined in `json_minimal.ebnf` and is written in the Extended Backus-Naur Form (EBNF).
|
77 |
Internally, it relies on the library [`transformers-cfg`](https://github.com/epfl-dlab/transformers-CFG).
|
78 |
For demo purpose, gpt2 is used, but you can use much larger models for better performance.
|