Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,9 @@ model_name = "microsoft/phi-2"
|
|
25 |
phi2_text = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
|
26 |
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
27 |
|
28 |
-
def example_inference(input_text, count
|
29 |
pred_text = textMode(input_text, count)
|
30 |
-
return pred_text
|
31 |
|
32 |
|
33 |
|
@@ -83,10 +83,10 @@ with gr.Blocks() as demo:
|
|
83 |
|
84 |
gr.Examples(
|
85 |
examples=[
|
86 |
-
["What is a large language model?","50"
|
87 |
],
|
88 |
-
inputs=[text_input, text_input_count
|
89 |
-
outputs=[text_output
|
90 |
fn=example_inference,
|
91 |
)
|
92 |
|
|
|
25 |
phi2_text = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
|
26 |
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
27 |
|
28 |
+
def example_inference(input_text, count) #, image, img_qn, audio):
|
29 |
pred_text = textMode(input_text, count)
|
30 |
+
return pred_text #, "in progress", "in progress"
|
31 |
|
32 |
|
33 |
|
|
|
83 |
|
84 |
gr.Examples(
|
85 |
examples=[
|
86 |
+
["What is a large language model?","50"] #,"","Describe the image",""]
|
87 |
],
|
88 |
+
inputs=[text_input, text_input_count] #, image_input, image_text_input, audio_input],
|
89 |
+
outputs=[text_output] #, image_text_output, audio_text_output],
|
90 |
fn=example_inference,
|
91 |
)
|
92 |
|