Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,17 +51,17 @@ class Story(Document):
|
|
| 51 |
story_id = SequenceField(primary_key=True)
|
| 52 |
|
| 53 |
def make_prompt(entry):
|
| 54 |
-
return f"### Human:YOUR INSTRUCTION HERE,
|
| 55 |
|
| 56 |
@spaces.GPU
|
| 57 |
def generate(
|
| 58 |
message: str,
|
| 59 |
chat_history: list[tuple[str, str]],
|
| 60 |
max_new_tokens: int = 1024,
|
| 61 |
-
temperature: float = 0.
|
| 62 |
top_p: float = 0.6,
|
| 63 |
-
top_k: int =
|
| 64 |
-
repetition_penalty: float = 1.
|
| 65 |
|
| 66 |
) -> Iterator[str]:
|
| 67 |
conversation = []
|
|
|
|
| 51 |
story_id = SequenceField(primary_key=True)
|
| 52 |
|
| 53 |
def make_prompt(entry):
|
| 54 |
+
return f"### Human:YOUR INSTRUCTION HERE,TELL A STORY,RELATE TO COMPUTER SCIENCE: {entry} ### Assistant:"
|
| 55 |
|
| 56 |
@spaces.GPU
|
| 57 |
def generate(
|
| 58 |
message: str,
|
| 59 |
chat_history: list[tuple[str, str]],
|
| 60 |
max_new_tokens: int = 1024,
|
| 61 |
+
temperature: float = 0.5,
|
| 62 |
top_p: float = 0.6,
|
| 63 |
+
top_k: int = 40,
|
| 64 |
+
repetition_penalty: float = 1.0,
|
| 65 |
|
| 66 |
) -> Iterator[str]:
|
| 67 |
conversation = []
|