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: