Satyam-Singh commited on
Commit
55622f1
·
verified ·
1 Parent(s): f532332

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -66
app.py CHANGED
@@ -7,71 +7,6 @@ client = InferenceClient("Satyam-Singh/LLaVa-Large-Language-Virtual-Assistant")
7
 
8
  TITLE = """<h1 align="center">LLaVa Large Language Virtual Assistant</h1>"""
9
 
10
- temperature_component = gr.Slider(
11
- minimum=0,
12
- maximum=1.0,
13
- value=0.4,
14
- step=0.05,
15
- label="Temperature",
16
- info=(
17
- "Temperature controls the degree of randomness in token selection. Lower "
18
- "temperatures are good for prompts that expect a true or correct response, "
19
- "while higher temperatures can lead to more diverse or unexpected results. "
20
- ))
21
- max_output_tokens_component = gr.Slider(
22
- minimum=1,
23
- maximum=2048,
24
- value=1024,
25
- step=1,
26
- label="Token limit",
27
- info=(
28
- "Token limit determines the maximum amount of text output from one prompt. A "
29
- "token is approximately four characters. The default value is 2048."
30
- ))
31
- stop_sequences_component = gr.Textbox(
32
- label="Add stop sequence",
33
- value="",
34
- type="text",
35
- placeholder="STOP, END",
36
- info=(
37
- "A stop sequence is a series of characters (including spaces) that stops "
38
- "response generation if the model encounters it. The sequence is not included "
39
- "as part of the response. You can add up to five stop sequences."
40
- ))
41
- top_k_component = gr.Slider(
42
- minimum=1,
43
- maximum=40,
44
- value=32,
45
- step=1,
46
- label="Top-K",
47
- info=(
48
- "Top-k changes how the model selects tokens for output. A top-k of 1 means the "
49
- "selected token is the most probable among all tokens in the model’s "
50
- "vocabulary (also called greedy decoding), while a top-k of 3 means that the "
51
- "next token is selected from among the 3 most probable tokens (using "
52
- "temperature)."
53
- ))
54
- top_p_component = gr.Slider(
55
- minimum=0,
56
- maximum=1,
57
- value=1,
58
- step=0.01,
59
- label="Top-P",
60
- info=(
61
- "Top-p changes how the model selects tokens for output. Tokens are selected "
62
- "from most probable to least until the sum of their probabilities equals the "
63
- "top-p value. For example, if tokens A, B, and C have a probability of .3, .2, "
64
- "and .1 and the top-p value is .5, then the model will select either A or B as "
65
- "the next token (using temperature). "
66
- ))
67
-
68
- additional_inputs = [
69
- temperature_component,
70
- max_output_tokens_component,
71
- stop_sequences_component,
72
- top_k_component,
73
- top_p_component,
74
- ]
75
 
76
  safety_settings = [
77
  {
@@ -193,7 +128,6 @@ gr.ChatInterface(
193
  ),
194
  title="LLAVA: Large Language Virtual Assistant",
195
  description="Official Demo Of ```LLAVA``` based on ```Large Language Virtual Assistant ```.",
196
- additional_inputs=additional_inputs,
197
  examples=examples,
198
  concurrency_limit=20,
199
  ).launch(show_api=True)
 
7
 
8
  TITLE = """<h1 align="center">LLaVa Large Language Virtual Assistant</h1>"""
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  safety_settings = [
12
  {
 
128
  ),
129
  title="LLAVA: Large Language Virtual Assistant",
130
  description="Official Demo Of ```LLAVA``` based on ```Large Language Virtual Assistant ```.",
 
131
  examples=examples,
132
  concurrency_limit=20,
133
  ).launch(show_api=True)