Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,6 @@ import spaces
|
|
3 |
from huggingface_hub import InferenceClient
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
tokenizer = AutoTokenizer.from_pretrained("Svngoku/c4ai-command-r7b-12-2024-4bit")
|
10 |
model = AutoModelForCausalLM.from_pretrained("Svngoku/c4ai-command-r7b-12-2024-4bit")
|
11 |
|
@@ -56,7 +53,7 @@ def generate_response(message, history, documents_text):
|
|
56 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
57 |
"""
|
58 |
demo = gr.ChatInterface(
|
59 |
-
|
60 |
additional_inputs=[
|
61 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
62 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
|
3 |
from huggingface_hub import InferenceClient
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
|
|
|
|
|
|
|
6 |
tokenizer = AutoTokenizer.from_pretrained("Svngoku/c4ai-command-r7b-12-2024-4bit")
|
7 |
model = AutoModelForCausalLM.from_pretrained("Svngoku/c4ai-command-r7b-12-2024-4bit")
|
8 |
|
|
|
53 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
54 |
"""
|
55 |
demo = gr.ChatInterface(
|
56 |
+
generate_response,
|
57 |
additional_inputs=[
|
58 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
59 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|