Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ prompt_template="""<|begin_of_text|>Dibawah ini adalah percakapan antara dokter
|
|
28 |
|
29 |
def output_inference(tanya, history):
|
30 |
prompt = prompt_template.format(ask=tanya)
|
31 |
-
|
32 |
output = llm(
|
33 |
prompt,
|
34 |
stop=["<|end_of_text|>"],
|
@@ -39,9 +39,13 @@ def output_inference(tanya, history):
|
|
39 |
min_p=0.05,
|
40 |
typical_p=1.0,
|
41 |
stream=False,
|
42 |
-
|
43 |
)
|
44 |
-
|
|
|
|
|
|
|
|
|
45 |
|
46 |
|
47 |
gr.ChatInterface(
|
|
|
28 |
|
29 |
def output_inference(tanya, history):
|
30 |
prompt = prompt_template.format(ask=tanya)
|
31 |
+
|
32 |
output = llm(
|
33 |
prompt,
|
34 |
stop=["<|end_of_text|>"],
|
|
|
39 |
min_p=0.05,
|
40 |
typical_p=1.0,
|
41 |
stream=False,
|
42 |
+
|
43 |
)
|
44 |
+
inference = output['choices'][0]['text']
|
45 |
+
|
46 |
+
for i in range(len(inference)):
|
47 |
+
yield inference[: i+1]
|
48 |
+
# return output['choices'][0]['text']
|
49 |
|
50 |
|
51 |
gr.ChatInterface(
|