rdlf commited on
Commit
7e5d3e9
·
verified ·
1 Parent(s): 3e96643

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -6,7 +6,15 @@ pipe = pipeline("text-generation", model="somosnlp/Phi-2-LenguajeClaro", trust_r
6
  import gradio as gr
7
 
8
  def eval_text (text):
9
- result = pipe(text, max_length=200)
 
 
 
 
 
 
 
 
10
  return (result[0]['generated_text'])
11
 
12
  demo = gr.Interface(fn=eval_text, inputs="text", outputs="text", title="Lenguaje Claro")
 
6
  import gradio as gr
7
 
8
  def eval_text (text):
9
+ new_prompt = f"""###System:
10
+ Lee el siguiente texto y hazlo más claro:
11
+ ###Texto:
12
+
13
+ {text}
14
+
15
+ ###Texto aclarado:
16
+ """
17
+ result = pipe(new_prompt, max_length=200)
18
  return (result[0]['generated_text'])
19
 
20
  demo = gr.Interface(fn=eval_text, inputs="text", outputs="text", title="Lenguaje Claro")