Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ from huggingface_hub import InferenceClient
|
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
|
5 |
-
|
6 |
|
7 |
def format_prompt(message, history):
|
8 |
prompt = "<s>"
|
@@ -13,10 +13,8 @@ def format_prompt(message, history):
|
|
13 |
return prompt
|
14 |
|
15 |
def generate(
|
16 |
-
prompt, history,
|
17 |
):
|
18 |
-
|
19 |
-
client = InferenceClient(f"{model_version}")
|
20 |
|
21 |
temperature = float(temperature)
|
22 |
if temperature < 1e-2:
|
@@ -50,11 +48,6 @@ def generate(
|
|
50 |
|
51 |
|
52 |
additional_inputs=[
|
53 |
-
gr.Dropdown(
|
54 |
-
["mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mixtral-8x7B-v0.1"],
|
55 |
-
label="Mixtral 8x7b Models",
|
56 |
-
value="mistralai/Mixtral-8x7B-Instruct-v0.1",
|
57 |
-
),
|
58 |
gr.Textbox(
|
59 |
label="System Prompt",
|
60 |
interactive=True,
|
|
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
|
5 |
+
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
6 |
|
7 |
def format_prompt(message, history):
|
8 |
prompt = "<s>"
|
|
|
13 |
return prompt
|
14 |
|
15 |
def generate(
|
16 |
+
prompt, history, system_prompt, max_new_tokens, temperature, repetition_penalty, top_p, top_k, seed,
|
17 |
):
|
|
|
|
|
18 |
|
19 |
temperature = float(temperature)
|
20 |
if temperature < 1e-2:
|
|
|
48 |
|
49 |
|
50 |
additional_inputs=[
|
|
|
|
|
|
|
|
|
|
|
51 |
gr.Textbox(
|
52 |
label="System Prompt",
|
53 |
interactive=True,
|