tabedini commited on
Commit
7b824e3
1 Parent(s): c0c31b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -28,15 +28,12 @@ PLACEHOLDER = """
28
 
29
  custom_css = """
30
  @import url('https://fonts.googleapis.com/css2?family=Vazirmatn&display=swap');
31
-
32
  body, .gradio-container, .gr-button, .gr-input, .gr-slider, .gr-dropdown, .gr-markdown {
33
  font-family: 'Vazirmatn', sans-serif !important;
34
  }
35
-
36
  ._button {
37
  font-size: 20px;
38
  }
39
-
40
  pre, code {
41
  direction: ltr !important;
42
  unicode-bidi: plaintext !important;
@@ -145,7 +142,18 @@ def generate(
145
 
146
  generation_speed = token_per_second_calculator(sum_tokens, time_delta)
147
 
148
- log_function = log_to_langfuse(message, chat_history, max_new_tokens, temperature, top_p, top_k, repetition_penalty, do_sample, generation_speed, outputs)
 
 
 
 
 
 
 
 
 
 
 
149
 
150
 
151
 
@@ -218,3 +226,4 @@ with gr.Blocks(css=custom_css, fill_height=False) as demo:
218
 
219
  if __name__ == "__main__":
220
  demo.queue(max_size=20).launch()
 
 
28
 
29
  custom_css = """
30
  @import url('https://fonts.googleapis.com/css2?family=Vazirmatn&display=swap');
 
31
  body, .gradio-container, .gr-button, .gr-input, .gr-slider, .gr-dropdown, .gr-markdown {
32
  font-family: 'Vazirmatn', sans-serif !important;
33
  }
 
34
  ._button {
35
  font-size: 20px;
36
  }
 
37
  pre, code {
38
  direction: ltr !important;
39
  unicode-bidi: plaintext !important;
 
142
 
143
  generation_speed = token_per_second_calculator(sum_tokens, time_delta)
144
 
145
+ log_function = log_to_langfuse(
146
+ message=message,
147
+ chat_history=chat_history,
148
+ max_new_tokens=max_new_tokens,
149
+ temperature=temperature,
150
+ top_p=top_p,
151
+ top_k=top_k,
152
+ repetition_penalty=repetition_penalty,
153
+ do_sample=do_sample,
154
+ generation_speed=generation_speed,
155
+ model_outputs=outputs,
156
+ )
157
 
158
 
159
 
 
226
 
227
  if __name__ == "__main__":
228
  demo.queue(max_size=20).launch()
229
+