Update app.py
Browse files
app.py
CHANGED
|
@@ -547,7 +547,7 @@ def generate_code(prompt_in, file, chatbot, history, model_option, openai_api_ke
|
|
| 547 |
####################################################
|
| 548 |
#aus einem Text-Prompt die Antwort von KI bekommen
|
| 549 |
#mit oder ohne RAG möglich
|
| 550 |
-
def generate_code_antwort (prompt, chatbot, history,
|
| 551 |
suche_im_Netz="Antwort der KI ..."
|
| 552 |
print("Text pur..............................")
|
| 553 |
if (openai_api_key == "" or openai_api_key == "sk-"):
|
|
@@ -628,7 +628,6 @@ with gr.Blocks(css=custom_css(), theme=themeAlex) as demo:
|
|
| 628 |
attached_file = gr.State(None)
|
| 629 |
attached_file_history = gr.State(None)
|
| 630 |
attached_file3 = gr.State(None)
|
| 631 |
-
attached_file_history3 = gr.State(None)
|
| 632 |
status_display = gr.State("")
|
| 633 |
status_display2 = gr.State("")
|
| 634 |
status_display3 = gr.State("")
|
|
@@ -779,7 +778,7 @@ with gr.Blocks(css=custom_css(), theme=themeAlex) as demo:
|
|
| 779 |
#file_display = gr.File(visible=False)
|
| 780 |
image_display3 = gr.Image( visible=False)
|
| 781 |
upload3 = gr.UploadButton("📁", file_types=["image", "pdf", "docx", "pptx", "xlsx"], scale = 10)
|
| 782 |
-
emptyBtn3 = gr.ClearButton([
|
| 783 |
with gr.Column():
|
| 784 |
with gr.Column(min_width=50, scale=1):
|
| 785 |
with gr.Tab(label="Parameter Einstellung"):
|
|
@@ -878,7 +877,6 @@ with gr.Blocks(css=custom_css(), theme=themeAlex) as demo:
|
|
| 878 |
history3,
|
| 879 |
model_option,
|
| 880 |
openai_key,
|
| 881 |
-
anzahl_docs3,
|
| 882 |
top_p,
|
| 883 |
temperature,
|
| 884 |
max_length_tokens,
|
|
|
|
| 547 |
####################################################
|
| 548 |
#aus einem Text-Prompt die Antwort von KI bekommen
|
| 549 |
#mit oder ohne RAG möglich
|
| 550 |
+
def generate_code_antwort (prompt, chatbot, history, model_option, openai_api_key, k=3, top_p=0.6, temperature=0.5, max_new_tokens=4048, max_context_length_tokens=2048, repetition_penalty=1.3, top_k=35):
|
| 551 |
suche_im_Netz="Antwort der KI ..."
|
| 552 |
print("Text pur..............................")
|
| 553 |
if (openai_api_key == "" or openai_api_key == "sk-"):
|
|
|
|
| 628 |
attached_file = gr.State(None)
|
| 629 |
attached_file_history = gr.State(None)
|
| 630 |
attached_file3 = gr.State(None)
|
|
|
|
| 631 |
status_display = gr.State("")
|
| 632 |
status_display2 = gr.State("")
|
| 633 |
status_display3 = gr.State("")
|
|
|
|
| 778 |
#file_display = gr.File(visible=False)
|
| 779 |
image_display3 = gr.Image( visible=False)
|
| 780 |
upload3 = gr.UploadButton("📁", file_types=["image", "pdf", "docx", "pptx", "xlsx"], scale = 10)
|
| 781 |
+
emptyBtn3 = gr.ClearButton([user_input3, chatbot_code, history3, attached_file3, image_display3], value="🧹 Neue Session", scale=10)
|
| 782 |
with gr.Column():
|
| 783 |
with gr.Column(min_width=50, scale=1):
|
| 784 |
with gr.Tab(label="Parameter Einstellung"):
|
|
|
|
| 877 |
history3,
|
| 878 |
model_option,
|
| 879 |
openai_key,
|
|
|
|
| 880 |
top_p,
|
| 881 |
temperature,
|
| 882 |
max_length_tokens,
|