Spaces:
Sleeping
Sleeping
fix
Browse files- gemmademo/_chat.py +3 -1
- gemmademo/_prompts.py +7 -0
gemmademo/_chat.py
CHANGED
|
@@ -96,7 +96,9 @@ class GradioChat:
|
|
| 96 |
with gr.Blocks() as demo:
|
| 97 |
with gr.Row():
|
| 98 |
with gr.Column(scale=3): # Sidebar column
|
| 99 |
-
gr.Markdown(
|
|
|
|
|
|
|
| 100 |
task_dropdown = gr.Dropdown(
|
| 101 |
choices=self.task_options,
|
| 102 |
value=self.current_task_name,
|
|
|
|
| 96 |
with gr.Blocks() as demo:
|
| 97 |
with gr.Row():
|
| 98 |
with gr.Column(scale=3): # Sidebar column
|
| 99 |
+
gr.Markdown(
|
| 100 |
+
"## Google Gemma Models: lightweight, state-of-the-art open models from Google"
|
| 101 |
+
)
|
| 102 |
task_dropdown = gr.Dropdown(
|
| 103 |
choices=self.task_options,
|
| 104 |
value=self.current_task_name,
|
gemmademo/_prompts.py
CHANGED
|
@@ -1,4 +1,11 @@
|
|
| 1 |
class PromptManager:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
def __init__(self, task):
|
| 3 |
self.task = task
|
| 4 |
|
|
|
|
| 1 |
class PromptManager:
|
| 2 |
+
"""
|
| 3 |
+
A manager for generating prompts based on different tasks.
|
| 4 |
+
|
| 5 |
+
This class provides methods to format user input into prompts suitable for
|
| 6 |
+
various tasks such as Question Answering, Text Generation, and Code Completion.
|
| 7 |
+
It raises a ValueError if an unsupported task is specified.
|
| 8 |
+
"""
|
| 9 |
def __init__(self, task):
|
| 10 |
self.task = task
|
| 11 |
|