Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,12 +53,33 @@ with gr.Blocks() as demo:
|
|
| 53 |
title = gr.Textbox(label="Title", placeholder="Enter title")
|
| 54 |
abstract = gr.Textbox(label="Abstract", placeholder="Enter abstract", lines=6)
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
submit = gr.Button("Classify")
|
| 57 |
|
| 58 |
def stream_chat(title_text, abstract_text):
|
| 59 |
user_input = f"Title: {title_text.strip()}\nAbstract: {abstract_text.strip()}"
|
| 60 |
-
yield [(user_input, "")] #
|
| 61 |
-
|
| 62 |
response_generator = stream_response(title_text, abstract_text)
|
| 63 |
for update in response_generator:
|
| 64 |
yield update
|
|
|
|
| 53 |
title = gr.Textbox(label="Title", placeholder="Enter title")
|
| 54 |
abstract = gr.Textbox(label="Abstract", placeholder="Enter abstract", lines=6)
|
| 55 |
|
| 56 |
+
# Examples for autofill
|
| 57 |
+
examples = [
|
| 58 |
+
[
|
| 59 |
+
"Effects of low-dose rivaroxaban combined with low-dose aspirin versus low-dose aspirin alone on in vivo platelet activation, endothelial function and inflammation in type 2 diabetes patients with stable atherosclerotic disease: the RivAsa randomized, crossover study",
|
| 60 |
+
"""Aims: A very-low-dose regimen of the anti-factor Xa rivaroxaban combined with low-dose aspirin reduces vascular events more than aspirin alone in atherosclerotic patients, including those with type 2 diabetes (T2DM). Given the high platelet activation in T2DM patients, we investigated whether this combination reduces platelet activation versus aspirin alone and the possible mechanisms.
|
| 61 |
+
|
| 62 |
+
Methods: Seventy-5 patients (12 females, aged 69 [65-72]), with stable atherothrombotic disease, on low-dose aspirin, participated in a randomized, cross-over, open-label, study with two arms: 4-week aspirin (100 mg once-daily) followed by 4-week aspirin plus rivaroxaban (2.5 mg twice-daily); 4-week aspirin plus rivaroxaban followed by 4-week aspirin. We investigated: in vivo platelet activation by urinary thromboxane A2 metabolite (TXM), thrombin generation (TG), endothelial function by urinary prostacyclin and plasma nitric oxide metabolites, lipid oxidation by urinary isoprostane, inflammation, coagulation biomarkers.
|
| 63 |
+
|
| 64 |
+
Results: No carryover effects were observed. Rivaroxaban plus aspirin significantly reduced urinary TXM and isoprostane versus aspirin alone (20% [95 %CI:5-31 %] and 19% [12-26%], respectively, n = 73, p < 0.01). At rivaroxaban's maximal concentration, TG velocity index and peak were reduced by 44% [37-52%] and 81%[75-87%], respectively, versus aspirin alone. Inflammation and endothelial biomarkers were unchanged.
|
| 65 |
+
|
| 66 |
+
Conclusions: Very-low-dose rivaroxaban and low-dose aspirin in T2DM patients significantly inhibit in vivo platelet function, TG and isoprostane formation. EudraCT Number: 2019-000610-10."""
|
| 67 |
+
]
|
| 68 |
+
# Add more examples here if needed
|
| 69 |
+
]
|
| 70 |
+
|
| 71 |
+
gr.Examples(
|
| 72 |
+
examples=examples,
|
| 73 |
+
inputs=[title, abstract],
|
| 74 |
+
label="Example Articles",
|
| 75 |
+
examples_per_page=1
|
| 76 |
+
)
|
| 77 |
+
|
| 78 |
submit = gr.Button("Classify")
|
| 79 |
|
| 80 |
def stream_chat(title_text, abstract_text):
|
| 81 |
user_input = f"Title: {title_text.strip()}\nAbstract: {abstract_text.strip()}"
|
| 82 |
+
yield [(user_input, "")] # initial blank output
|
|
|
|
| 83 |
response_generator = stream_response(title_text, abstract_text)
|
| 84 |
for update in response_generator:
|
| 85 |
yield update
|