Spaces:
Runtime error
Runtime error
tc043 commited on
Commit ·
c8f975e
1
Parent(s): 6c0dd9b
feat: add environment variable support and expand grammar allowed character set
Browse files- app.py +2 -0
- grammar.gbnf +1 -1
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -2,6 +2,8 @@ import asyncio
|
|
| 2 |
import json
|
| 3 |
import os
|
| 4 |
from pathlib import Path
|
|
|
|
|
|
|
| 5 |
|
| 6 |
import gradio as gr
|
| 7 |
from fastapi import FastAPI, WebSocket, WebSocketDisconnect
|
|
|
|
| 2 |
import json
|
| 3 |
import os
|
| 4 |
from pathlib import Path
|
| 5 |
+
from dotenv import load_dotenv
|
| 6 |
+
load_dotenv()
|
| 7 |
|
| 8 |
import gradio as gr
|
| 9 |
from fastapi import FastAPI, WebSocket, WebSocketDisconnect
|
grammar.gbnf
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
root ::= "{" ws "\"task\"" ws ":" ws string ws "}"
|
| 2 |
value ::= string
|
| 3 |
-
string ::= "\"" [a-zA-Z0-9
|
| 4 |
ws ::= [ \t\n]*
|
|
|
|
| 1 |
root ::= "{" ws "\"task\"" ws ":" ws string ws "}"
|
| 2 |
value ::= string
|
| 3 |
+
string ::= "\"" [a-zA-Z0-9 ,.!?'-]+ "\""
|
| 4 |
ws ::= [ \t\n]*
|
requirements.txt
CHANGED
|
@@ -2,3 +2,4 @@ fastapi==0.115.6
|
|
| 2 |
gradio==5.9.1
|
| 3 |
uvicorn[standard]==0.32.1
|
| 4 |
websockets==14.1
|
|
|
|
|
|
| 2 |
gradio==5.9.1
|
| 3 |
uvicorn[standard]==0.32.1
|
| 4 |
websockets==14.1
|
| 5 |
+
requests
|