Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def call_invoke_llm(context, prompt, model):
|
|
34 |
# Create the Gradio interface using Blocks
|
35 |
with gr.Blocks(title='BotNews') as page:
|
36 |
gr.Markdown("# BotNews")
|
37 |
-
gr.Markdown("## Gerar
|
38 |
gr.Markdown(" ")
|
39 |
gr.Markdown("<b>Instrução:</b> Preencha abaixo com um assunto (Por exemplo: 'Guerra em Israel' ou 'Economia do Brasil').")
|
40 |
gr.Markdown(" ")
|
@@ -52,7 +52,7 @@ with gr.Blocks(title='BotNews') as page:
|
|
52 |
input3 = gr.Textbox(label="Mínimo de palavras:", lines=1, value="300", scale=1)
|
53 |
input4 = gr.Textbox(label="Máximo de palavras:", lines=1, value="700", scale=1)
|
54 |
with gr.Row():
|
55 |
-
button1 = gr.Button("
|
56 |
with gr.Row():
|
57 |
output1 = gr.Textbox(label="Notícia gerada por IA", lines=25)
|
58 |
gr.Markdown("<hr>")
|
|
|
34 |
# Create the Gradio interface using Blocks
|
35 |
with gr.Blocks(title='BotNews') as page:
|
36 |
gr.Markdown("# BotNews")
|
37 |
+
gr.Markdown("## Gerar a notícia com IA")
|
38 |
gr.Markdown(" ")
|
39 |
gr.Markdown("<b>Instrução:</b> Preencha abaixo com um assunto (Por exemplo: 'Guerra em Israel' ou 'Economia do Brasil').")
|
40 |
gr.Markdown(" ")
|
|
|
52 |
input3 = gr.Textbox(label="Mínimo de palavras:", lines=1, value="300", scale=1)
|
53 |
input4 = gr.Textbox(label="Máximo de palavras:", lines=1, value="700", scale=1)
|
54 |
with gr.Row():
|
55 |
+
button1 = gr.Button("Ajustar a notícia com IA")
|
56 |
with gr.Row():
|
57 |
output1 = gr.Textbox(label="Notícia gerada por IA", lines=25)
|
58 |
gr.Markdown("<hr>")
|
rag.py
CHANGED
@@ -98,10 +98,10 @@ class Rag:
|
|
98 |
The source written in the pieces of text should not be shown in the news.
|
99 |
The news should have between {min_words} and {max_words} words.
|
100 |
The total of words should no be shown in the news.
|
101 |
-
After write the news, confirm if it is written in Portuguese language.
|
102 |
Answer the title and the news, nothing more.
|
103 |
The news should be about the following context: <{context}>
|
104 |
Question: <{question}>
|
|
|
105 |
Answer here:
|
106 |
Title:
|
107 |
News:"""
|
|
|
98 |
The source written in the pieces of text should not be shown in the news.
|
99 |
The news should have between {min_words} and {max_words} words.
|
100 |
The total of words should no be shown in the news.
|
|
|
101 |
Answer the title and the news, nothing more.
|
102 |
The news should be about the following context: <{context}>
|
103 |
Question: <{question}>
|
104 |
+
After write the news, confirm if it is written in Portuguese language.
|
105 |
Answer here:
|
106 |
Title:
|
107 |
News:"""
|