Spaces:
Runtime error
Runtime error
Commit
·
7af0ad0
1
Parent(s):
ebba9cb
Update app.py
Browse files
app.py
CHANGED
@@ -40,28 +40,18 @@ def the_process(input_text, model_choice):
|
|
40 |
print("Inside the_process for python 1", model_choice)
|
41 |
if(model_choice==1):
|
42 |
if(pythonFlag == "false"):
|
43 |
-
print("Inside
|
44 |
tokenizer = AutoTokenizer.from_pretrained("nadiamaqbool81/starcoderbase-1b-hf_python")
|
45 |
model = AutoModelForCausalLM.from_pretrained("nadiamaqbool81/starcoderbase-1b-hf_python")
|
46 |
output = run_predict(input_text, model, tokenizer)
|
47 |
print("output" , output)
|
48 |
-
pythonFlag = "true"
|
49 |
-
elif(pythonFlag == "true"):
|
50 |
-
print("pythonFlag", pythonFlag)
|
51 |
-
output = run_predict(input_text, model, tokenizer)
|
52 |
-
print("output" , output)
|
53 |
if(model_choice==0):
|
54 |
if(javaFlag == "false"):
|
55 |
-
print("Inside
|
56 |
tokenizer = AutoTokenizer.from_pretrained("nadiamaqbool81/starcoderbase-1b-hf")
|
57 |
model = AutoModelForCausalLM.from_pretrained("nadiamaqbool81/starcoderbase-1b-hf")
|
58 |
output = run_predict(input_text, model, tokenizer)
|
59 |
print("output" , output)
|
60 |
-
javaFlag = "true"
|
61 |
-
elif(javaFlag == "true"):
|
62 |
-
print("javaFlag", javaFlag)
|
63 |
-
output = run_predict(input_text, model, tokenizer)
|
64 |
-
print("output" , output)
|
65 |
else:
|
66 |
a_variable = model_box[model_choice]
|
67 |
output = a_variable(input_text)
|
|
|
40 |
print("Inside the_process for python 1", model_choice)
|
41 |
if(model_choice==1):
|
42 |
if(pythonFlag == "false"):
|
43 |
+
print("Inside starcoder for python")
|
44 |
tokenizer = AutoTokenizer.from_pretrained("nadiamaqbool81/starcoderbase-1b-hf_python")
|
45 |
model = AutoModelForCausalLM.from_pretrained("nadiamaqbool81/starcoderbase-1b-hf_python")
|
46 |
output = run_predict(input_text, model, tokenizer)
|
47 |
print("output" , output)
|
|
|
|
|
|
|
|
|
|
|
48 |
if(model_choice==0):
|
49 |
if(javaFlag == "false"):
|
50 |
+
print("Inside starcoder for python")
|
51 |
tokenizer = AutoTokenizer.from_pretrained("nadiamaqbool81/starcoderbase-1b-hf")
|
52 |
model = AutoModelForCausalLM.from_pretrained("nadiamaqbool81/starcoderbase-1b-hf")
|
53 |
output = run_predict(input_text, model, tokenizer)
|
54 |
print("output" , output)
|
|
|
|
|
|
|
|
|
|
|
55 |
else:
|
56 |
a_variable = model_box[model_choice]
|
57 |
output = a_variable(input_text)
|