Spaces:
Sleeping
Sleeping
daniellefranca96
commited on
Commit
•
f2886e5
1
Parent(s):
3a73661
Update main.py
Browse files
main.py
CHANGED
@@ -46,6 +46,9 @@ llms = {
|
|
46 |
class validation(BaseModel):
|
47 |
prompt: str
|
48 |
llm: str
|
|
|
|
|
|
|
49 |
|
50 |
#Fast API
|
51 |
app = FastAPI()
|
@@ -56,8 +59,8 @@ async def stream(item: validation):
|
|
56 |
model = llms[item.llm]
|
57 |
prefix=model['prefix']
|
58 |
suffix=model['suffix']
|
59 |
-
nctx = model['nctx'] if
|
60 |
-
max_tokens = model['max_tokens'] if
|
61 |
user="""
|
62 |
{prompt}"""
|
63 |
|
|
|
46 |
class validation(BaseModel):
|
47 |
prompt: str
|
48 |
llm: str
|
49 |
+
max_tokens: int
|
50 |
+
nctx: int
|
51 |
+
|
52 |
|
53 |
#Fast API
|
54 |
app = FastAPI()
|
|
|
59 |
model = llms[item.llm]
|
60 |
prefix=model['prefix']
|
61 |
suffix=model['suffix']
|
62 |
+
nctx = model['nctx'] if item.nctx is not None else 1024
|
63 |
+
max_tokens = model['max_tokens'] if item.max_tokens is not None else 512
|
64 |
user="""
|
65 |
{prompt}"""
|
66 |
|