Spaces:
Sleeping
Sleeping
Update main.py
Browse filessuitable place for logging
main.py
CHANGED
@@ -15,12 +15,14 @@ class validation(BaseModel):
|
|
15 |
prompt: str
|
16 |
#Fast API
|
17 |
app = FastAPI()
|
18 |
-
#payload_llm = "This was the payload used : " + str
|
19 |
-
logging.basicConfig(format='%(process)d-%(levelname)s-%(message)s')
|
20 |
-
logging.info(str)
|
21 |
|
22 |
@app.post("/bpandey23_llm")
|
23 |
async def stream(item: validation):
|
|
|
|
|
|
|
|
|
|
|
24 |
system_prompt = 'Below is an instruction that describes a task. Write a response that appropriately completes the request.'
|
25 |
E_INST = "</s>"
|
26 |
user, assistant = "<|user|>", "<|assistant|>"
|
|
|
15 |
prompt: str
|
16 |
#Fast API
|
17 |
app = FastAPI()
|
|
|
|
|
|
|
18 |
|
19 |
@app.post("/bpandey23_llm")
|
20 |
async def stream(item: validation):
|
21 |
+
logging.basicConfig(format='%(process)d-%(levelname)s-%(message)s')
|
22 |
+
payload_llm="This is the prompt by the user: " + item.prompt
|
23 |
+
logging.info(payload_llm)
|
24 |
+
|
25 |
+
#llm stuff starts now
|
26 |
system_prompt = 'Below is an instruction that describes a task. Write a response that appropriately completes the request.'
|
27 |
E_INST = "</s>"
|
28 |
user, assistant = "<|user|>", "<|assistant|>"
|