kjcjohnson
commited on
Commit
·
8261f3e
1
Parent(s):
dfffec6
Update model
Browse files
app.py
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
import loop
|
3 |
|
4 |
-
MODEL_ID = "TinyLlama/TinyLlama_v1.1_math_code"
|
|
|
5 |
|
6 |
handler = loop.EndpointHandler(MODEL_ID)
|
7 |
|
8 |
def respond(prompt, grammar):
|
9 |
args = { "inputs": prompt, "grammar": grammar }
|
10 |
-
return handler(args)
|
11 |
|
12 |
demo = gr.Interface(
|
13 |
respond,
|
|
|
1 |
import gradio as gr
|
2 |
import loop
|
3 |
|
4 |
+
# MODEL_ID = "TinyLlama/TinyLlama_v1.1_math_code"
|
5 |
+
MODEL_ID = "codellama/CodeLlama-13b-Instruct-hf"
|
6 |
|
7 |
handler = loop.EndpointHandler(MODEL_ID)
|
8 |
|
9 |
def respond(prompt, grammar):
|
10 |
args = { "inputs": prompt, "grammar": grammar }
|
11 |
+
return handler(args)[0]
|
12 |
|
13 |
demo = gr.Interface(
|
14 |
respond,
|