Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def generate_text(input_text, selected_model, history_state):
|
|
69 |
# Prepare the formatted history string
|
70 |
formatted_history = "\n".join([f"Input: {entry['input']}\nModel: {entry['selected_model']}\nResponse: {entry['response']}\n" for entry in history])
|
71 |
|
72 |
-
return result, formatted_history
|
73 |
|
74 |
# Create Gradio interface with a dropdown for model selection
|
75 |
iface = gr.Interface(
|
@@ -81,7 +81,8 @@ iface = gr.Interface(
|
|
81 |
],
|
82 |
outputs=[
|
83 |
gr.Textbox(label="Response", placeholder="Response will be shown here"),
|
84 |
-
gr.Textbox(label="History", placeholder="Interaction history will be shown here", lines=10, interactive=False)
|
|
|
85 |
],
|
86 |
title="Chat with OpenRouter Models"
|
87 |
)
|
|
|
69 |
# Prepare the formatted history string
|
70 |
formatted_history = "\n".join([f"Input: {entry['input']}\nModel: {entry['selected_model']}\nResponse: {entry['response']}\n" for entry in history])
|
71 |
|
72 |
+
return result, formatted_history, history_state
|
73 |
|
74 |
# Create Gradio interface with a dropdown for model selection
|
75 |
iface = gr.Interface(
|
|
|
81 |
],
|
82 |
outputs=[
|
83 |
gr.Textbox(label="Response", placeholder="Response will be shown here"),
|
84 |
+
gr.Textbox(label="History", placeholder="Interaction history will be shown here", lines=10, interactive=False),
|
85 |
+
gr.State()
|
86 |
],
|
87 |
title="Chat with OpenRouter Models"
|
88 |
)
|