Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,10 @@ def query(system_prompt, user_prompt, temperature=0.9, max_new_tokens=256, top_p
|
|
29 |
do_sample=True,
|
30 |
seed=seed,
|
31 |
)
|
32 |
-
|
|
|
|
|
|
|
33 |
stream = client.text_generation(prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
34 |
output = ""
|
35 |
for response in stream:
|
@@ -41,6 +44,8 @@ def query(system_prompt, user_prompt, temperature=0.9, max_new_tokens=256, top_p
|
|
41 |
output = output.rstrip()
|
42 |
#yield output
|
43 |
#yield output
|
|
|
|
|
44 |
return output
|
45 |
|
46 |
iface = gr.Interface(
|
|
|
29 |
do_sample=True,
|
30 |
seed=seed,
|
31 |
)
|
32 |
+
print(system_prompt)
|
33 |
+
print(user_prompt)
|
34 |
+
print('-' * 20)
|
35 |
+
prompt = f"System: {system_prompt}\nUser: {user_prompt}\Medic:"
|
36 |
stream = client.text_generation(prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
37 |
output = ""
|
38 |
for response in stream:
|
|
|
44 |
output = output.rstrip()
|
45 |
#yield output
|
46 |
#yield output
|
47 |
+
print(output)
|
48 |
+
print('-' * 20)
|
49 |
return output
|
50 |
|
51 |
iface = gr.Interface(
|