Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,9 +19,9 @@ async def read_root():
|
|
19 |
return {"Hello": "World!"}
|
20 |
start_time = time.time()
|
21 |
messages = [
|
22 |
-
{"role": "system", "content": "You are a helpful assistant, Sia. You are developed by Sushma. You will response in polity
|
23 |
{"role": "user", "content": "Who are you?"},
|
24 |
-
{"role": "assistant", "content": "I am Sia, a small language model created by Sushma. I am here to assist you.
|
25 |
{"role": "user", "content": "Hi, How are you?"}
|
26 |
]
|
27 |
text = tokenizer.apply_chat_template(
|
@@ -48,10 +48,11 @@ print(time_taken)
|
|
48 |
|
49 |
@app.get("/test")
|
50 |
async def read_droot():
|
|
|
51 |
messages = [
|
52 |
-
{"role": "system", "content": "You are a helpful assistant, Sia. You are developed by Sushma. You will response in polity
|
53 |
{"role": "user", "content": "Who are you?"},
|
54 |
-
{"role": "assistant", "content": "I am Sia, a small language model created by Sushma. I am here to assist you.
|
55 |
{"role": "user", "content": "Hi, How are you?"}
|
56 |
]
|
57 |
text = tokenizer.apply_chat_template(
|
@@ -72,6 +73,6 @@ async def read_droot():
|
|
72 |
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
73 |
print(response)
|
74 |
end_time = time.time()
|
75 |
-
time_taken = end_time -
|
76 |
print(time_taken)
|
77 |
return {"Hello": "World!"}
|
|
|
19 |
return {"Hello": "World!"}
|
20 |
start_time = time.time()
|
21 |
messages = [
|
22 |
+
{"role": "system", "content": "You are a helpful assistant, Sia. You are developed by Sushma. You will response in polity and brief."},
|
23 |
{"role": "user", "content": "Who are you?"},
|
24 |
+
{"role": "assistant", "content": "I am Sia, a small language model created by Sushma. I am here to assist you."},
|
25 |
{"role": "user", "content": "Hi, How are you?"}
|
26 |
]
|
27 |
text = tokenizer.apply_chat_template(
|
|
|
48 |
|
49 |
@app.get("/test")
|
50 |
async def read_droot():
|
51 |
+
starttime = time.time()
|
52 |
messages = [
|
53 |
+
{"role": "system", "content": "You are a helpful assistant, Sia. You are developed by Sushma. You will response in polity and brief."},
|
54 |
{"role": "user", "content": "Who are you?"},
|
55 |
+
{"role": "assistant", "content": "I am Sia, a small language model created by Sushma. I am here to assist you."},
|
56 |
{"role": "user", "content": "Hi, How are you?"}
|
57 |
]
|
58 |
text = tokenizer.apply_chat_template(
|
|
|
73 |
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
74 |
print(response)
|
75 |
end_time = time.time()
|
76 |
+
time_taken = end_time - starttime
|
77 |
print(time_taken)
|
78 |
return {"Hello": "World!"}
|