5to9 commited on
Commit
0a3f3e2
·
1 Parent(s): 5d9e699

0.26 disable rtl

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -4,13 +4,11 @@ import torch
4
  import gradio as gr
5
  import logging
6
  from huggingface_hub import login
7
-
8
  import os
9
  import traceback
10
 
11
  from threading import Thread
12
 
13
- # Status: Breaks during generation
14
 
15
  logging.basicConfig(level=logging.DEBUG)
16
 
@@ -19,10 +17,6 @@ SPACER = '\n' + '*' * 40 + '\n'
19
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
20
  login(token=HF_TOKEN)
21
 
22
- models_available = [
23
- "NousResearch/Meta-Llama-3.1-8B-Instruct",
24
- "mistralai/Mistral-7B-Instruct-v0.3",
25
- ]
26
 
27
  model_a_info = {"id": "NousResearch/Meta-Llama-3.1-8B-Instruct",
28
  "name": "Meta Llama 3.1 8B Instruct"}
@@ -197,9 +191,9 @@ with gr.Blocks() as demo:
197
  system_prompt = gr.Textbox(lines=1, label="System Prompt", value="You are a helpful chatbot. Write a Nike style ad headline about the shame of being second best", show_copy_button=True)
198
  with gr.Row(variant="panel"):
199
  with gr.Column():
200
- chatbot_a = gr.Chatbot(label="Model A", rtl=True, likeable=True, show_copy_button=True, height=500)
201
  with gr.Column():
202
- chatbot_b = gr.Chatbot(label="Model B", rtl=True, likeable=True, show_copy_button=True, height=500)
203
  with gr.Row(variant="panel"):
204
  with gr.Column(scale=1):
205
  submit_btn = gr.Button(value="Generate", variant="primary")
 
4
  import gradio as gr
5
  import logging
6
  from huggingface_hub import login
 
7
  import os
8
  import traceback
9
 
10
  from threading import Thread
11
 
 
12
 
13
  logging.basicConfig(level=logging.DEBUG)
14
 
 
17
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
18
  login(token=HF_TOKEN)
19
 
 
 
 
 
20
 
21
  model_a_info = {"id": "NousResearch/Meta-Llama-3.1-8B-Instruct",
22
  "name": "Meta Llama 3.1 8B Instruct"}
 
191
  system_prompt = gr.Textbox(lines=1, label="System Prompt", value="You are a helpful chatbot. Write a Nike style ad headline about the shame of being second best", show_copy_button=True)
192
  with gr.Row(variant="panel"):
193
  with gr.Column():
194
+ chatbot_a = gr.Chatbot(label="Model A", likeable=True, show_copy_button=True, height=500)
195
  with gr.Column():
196
+ chatbot_b = gr.Chatbot(label="Model B", likeable=True, show_copy_button=True, height=500)
197
  with gr.Row(variant="panel"):
198
  with gr.Column(scale=1):
199
  submit_btn = gr.Button(value="Generate", variant="primary")