yonikremer commited on
Commit
49efed6
1 Parent(s): cd990a6

translated the UI to hebrew

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -11,35 +11,32 @@ from available_models import AVAILABLE_MODELS
11
  from hanlde_form_submit import on_form_submit
12
 
13
 
14
- st.title("Grouped Sampling Demo")
15
 
16
  with st.form("request_form"):
17
  selected_model_name: str = st.selectbox(
18
- label="Select a model",
19
  options=AVAILABLE_MODELS,
20
  help="opt-iml-max-30b generates better texts but is slower",
21
  )
22
 
23
  output_length: int = st.number_input(
24
- label="Number of word pieces in the generated text, 1-4096 (default: 100)",
25
  min_value=1,
26
  max_value=4096,
27
- value=100,
28
- help="The length of the output text in tokens (word pieces)."
29
  )
30
 
31
  submitted_prompt: str = st.text_area(
32
- label="Input for the model, It is highly recommended to write an English prompt.",
33
- help="Enter the prompt for the model. The model will generate a response based on this prompt.",
34
  value="Instruction: Answer in yes or no.\n"
35
- "Question: Is this a prompt?\n"
36
  "Answer: ",
37
  max_chars=2048,
38
  )
39
 
40
  submitted: bool = st.form_submit_button(
41
- label="Generate",
42
- help="Generate the output text.",
43
  disabled=False,
44
  )
45
 
@@ -54,7 +51,8 @@ with st.form("request_form"):
54
  st.error("Out of memory. Please try a smaller model, shorter prompt, or a smaller output length.")
55
  except (ValueError, TypeError, RuntimeError) as e:
56
  st.error(e)
57
- st.write(f"Generated text: {output}")
 
58
 
59
 
60
  with open("user_instructions_hebrew.md", "r") as fh:
 
11
  from hanlde_form_submit import on_form_submit
12
 
13
 
14
+ st.title("讚讙讬诪讛 讘拽讘讜爪讜转 - 砖讬诪讜砖 讬注讬诇 讘诪讜讚诇讬 砖驻讛 住讬讘转讬讬诐")
15
 
16
  with st.form("request_form"):
17
  selected_model_name: str = st.selectbox(
18
+ label="讘讞专讜 诪讜讚诇",
19
  options=AVAILABLE_MODELS,
20
  help="opt-iml-max-30b generates better texts but is slower",
21
  )
22
 
23
  output_length: int = st.number_input(
24
+ label="讻诪讜转 讛诪讬诇讬诐 讛诪拽住讬诪诇讬转 讘驻诇讟 - 讘讬谉 1 诇-4096",
25
  min_value=1,
26
  max_value=4096,
27
+ value=5,
 
28
  )
29
 
30
  submitted_prompt: str = st.text_area(
31
+ label="讛拽诇讟 诇讗诇讜讙专讬转诐 (讘讗谞讙诇讬转 讘诇讘讚)",
 
32
  value="Instruction: Answer in yes or no.\n"
33
+ "Question: Is the sky blue?\n"
34
  "Answer: ",
35
  max_chars=2048,
36
  )
37
 
38
  submitted: bool = st.form_submit_button(
39
+ label="爪讜专 讟拽住讟",
 
40
  disabled=False,
41
  )
42
 
 
51
  st.error("Out of memory. Please try a smaller model, shorter prompt, or a smaller output length.")
52
  except (ValueError, TypeError, RuntimeError) as e:
53
  st.error(e)
54
+ else:
55
+ st.write(f"Generated text: {output}")
56
 
57
 
58
  with open("user_instructions_hebrew.md", "r") as fh: