Spaces:
Sleeping
Sleeping
Deepak Sahu
commited on
Commit
·
2c620b0
1
Parent(s):
f2b9b39
Update z_hypothetical_summary.py
Browse files
z_hypothetical_summary.py
CHANGED
@@ -28,12 +28,12 @@ def generate_summaries(book_title: str, genre: Optional[str] = None, n_samples=2
|
|
28 |
top_k: (default = 50)
|
29 |
top_p: (default=0.85)
|
30 |
model: CASUAL LM; this is a hack to adjust for faster response in gradio
|
31 |
-
|
32 |
Returns:
|
33 |
summaries: list of hypothetical summaries.
|
34 |
'''
|
35 |
# select model
|
36 |
-
generator_model = model if model else
|
37 |
|
38 |
# basic prompt very similary to one used in fine-tuning
|
39 |
prompt = f'''Book Title: {book_title}
|
|
|
28 |
top_k: (default = 50)
|
29 |
top_p: (default=0.85)
|
30 |
model: CASUAL LM; this is a hack to adjust for faster response in gradio
|
31 |
+
|
32 |
Returns:
|
33 |
summaries: list of hypothetical summaries.
|
34 |
'''
|
35 |
# select model
|
36 |
+
generator_model = model if model else load_model()
|
37 |
|
38 |
# basic prompt very similary to one used in fine-tuning
|
39 |
prompt = f'''Book Title: {book_title}
|