Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,12 +60,8 @@ gemma_3_formatter = MessagesFormatter(
|
|
| 60 |
|
| 61 |
|
| 62 |
# Set the title and description
|
| 63 |
-
title = "
|
| 64 |
-
description = """
|
| 65 |
-
This interactive chat interface allows you to experiment with the [`gemma-3-1b-it`](https://huggingface.co/google/gemma-3-1b-it) text model using various prompts and generation parameters.
|
| 66 |
-
Users can select different model variants (GGUF format), system prompts, and observe generated responses in real-time.
|
| 67 |
-
Key generation parameters, such as `temperature`, `max_tokens`, `top_k` and others are exposed below for tuning model behavior.
|
| 68 |
-
For a detailed technical walkthrough, please refer to the accompanying **[blog post](https://sitammeur.medium.com/build-your-own-gemma-3-chatbot-with-gradio-and-llama-cpp-46457b22a28e)**."""
|
| 69 |
|
| 70 |
|
| 71 |
llm = None
|
|
@@ -75,7 +71,7 @@ def respond(
|
|
| 75 |
message: str,
|
| 76 |
history: List[Tuple[str, str]],
|
| 77 |
model: str = "gemma-3-1b-it-Q4_K_M.gguf", # Set default model
|
| 78 |
-
system_message: str = "You are a helpful assistant.",
|
| 79 |
max_tokens: int = 1024,
|
| 80 |
temperature: float = 0.7,
|
| 81 |
top_p: float = 0.95,
|
|
@@ -181,7 +177,7 @@ def respond(
|
|
| 181 |
# Create a chat interface
|
| 182 |
demo = gr.ChatInterface(
|
| 183 |
respond,
|
| 184 |
-
examples=[["
|
| 185 |
additional_inputs_accordion=gr.Accordion(
|
| 186 |
label="⚙️ Parameters", open=False, render=False
|
| 187 |
),
|
|
|
|
| 60 |
|
| 61 |
|
| 62 |
# Set the title and description
|
| 63 |
+
title = "Elisa AI Basic"
|
| 64 |
+
description = """Made with ❤️ by SpriFi"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
|
| 67 |
llm = None
|
|
|
|
| 71 |
message: str,
|
| 72 |
history: List[Tuple[str, str]],
|
| 73 |
model: str = "gemma-3-1b-it-Q4_K_M.gguf", # Set default model
|
| 74 |
+
system_message: str = "You are a helpful assistant. Your name is Elisa AI made by SpriFi Inc.",
|
| 75 |
max_tokens: int = 1024,
|
| 76 |
temperature: float = 0.7,
|
| 77 |
top_p: float = 0.95,
|
|
|
|
| 177 |
# Create a chat interface
|
| 178 |
demo = gr.ChatInterface(
|
| 179 |
respond,
|
| 180 |
+
examples=[["Explain Quantum Computing"], ["Tell me something about AI."], ["What is gravity?"]],
|
| 181 |
additional_inputs_accordion=gr.Accordion(
|
| 182 |
label="⚙️ Parameters", open=False, render=False
|
| 183 |
),
|