nadiamaqbool81 commited on
Commit
abfc408
·
1 Parent(s): bfdd67f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -8,6 +8,14 @@ models=[
8
  "nadiamaqbool81/llama-2-7b-int4-java-code-1.178k",
9
  "nadiamaqbool81/llama-2-7b-int4-python-code-510"
10
  ]
 
 
 
 
 
 
 
 
11
  model_box=[
12
  gr.load(f"models/{models[0]}"),
13
  gr.load(f"models/{models[1]}"),
@@ -24,7 +32,7 @@ def the_process(input_text, model_choice):
24
  return(output)
25
 
26
  gr.HTML("""<h1 style="font-weight:600;font-size:50;margin-top:4px;margin-bottom:4px;text-align:center;">Text to Code Generation</h1></div>""")
27
- model_choice = gr.Dropdown(label="Select Model", choices=[m for m in models], type="index", interactive=True)
28
  input_text = gr.Textbox(label="Input Prompt")
29
  output_window = gr.Code(label="Generated Code")
30
 
 
8
  "nadiamaqbool81/llama-2-7b-int4-java-code-1.178k",
9
  "nadiamaqbool81/llama-2-7b-int4-python-code-510"
10
  ]
11
+ names=[
12
+ "nadiamaqbool81/starcoderbase-java",
13
+ "nadiamaqbool81/starcoderbase-python",
14
+ "nadiamaqbool81/codet5-java",
15
+ "nadiamaqbool81/codet5-python",
16
+ "nadiamaqbool81/llama-2-java",
17
+ "nadiamaqbool81/llama-2-python"
18
+ ]
19
  model_box=[
20
  gr.load(f"models/{models[0]}"),
21
  gr.load(f"models/{models[1]}"),
 
32
  return(output)
33
 
34
  gr.HTML("""<h1 style="font-weight:600;font-size:50;margin-top:4px;margin-bottom:4px;text-align:center;">Text to Code Generation</h1></div>""")
35
+ model_choice = gr.Dropdown(label="Select Model", choices=[m for m in names], type="index", interactive=True)
36
  input_text = gr.Textbox(label="Input Prompt")
37
  output_window = gr.Code(label="Generated Code")
38