Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -654,7 +654,6 @@ def generate_with_streaming(messages, model, max_tokens=8192, temperature=0.7, t
|
|
| 654 |
track_usage("user123", str(messages[-1]) if messages else "",
|
| 655 |
end_time - start_time, len(str(messages)))
|
| 656 |
|
| 657 |
-
# Continue to Part 2...
|
| 658 |
def respond(message, chat_history, model_choice, max_tokens, temperature, top_p,
|
| 659 |
creativity, precision, system_prompt, use_web_search, research_mode, theme):
|
| 660 |
"""Main response handler with conversation history"""
|
|
@@ -935,7 +934,11 @@ with gr.Blocks(title="GPT-OSS Research Assistant") as demo:
|
|
| 935 |
export_btn.click(
|
| 936 |
export_conversation,
|
| 937 |
[chatbot, export_format],
|
| 938 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
| 939 |
process_url_content,
|
| 940 |
[url_input],
|
| 941 |
[url_output]
|
|
@@ -955,4 +958,4 @@ with gr.Blocks(title="GPT-OSS Research Assistant") as demo:
|
|
| 955 |
)
|
| 956 |
|
| 957 |
if __name__ == "__main__":
|
| 958 |
-
demo.launch()
|
|
|
|
| 654 |
track_usage("user123", str(messages[-1]) if messages else "",
|
| 655 |
end_time - start_time, len(str(messages)))
|
| 656 |
|
|
|
|
| 657 |
def respond(message, chat_history, model_choice, max_tokens, temperature, top_p,
|
| 658 |
creativity, precision, system_prompt, use_web_search, research_mode, theme):
|
| 659 |
"""Main response handler with conversation history"""
|
|
|
|
| 934 |
export_btn.click(
|
| 935 |
export_conversation,
|
| 936 |
[chatbot, export_format],
|
| 937 |
+
[export_output]
|
| 938 |
+
)
|
| 939 |
+
|
| 940 |
+
# URL processing events
|
| 941 |
+
url_button.click(
|
| 942 |
process_url_content,
|
| 943 |
[url_input],
|
| 944 |
[url_output]
|
|
|
|
| 958 |
)
|
| 959 |
|
| 960 |
if __name__ == "__main__":
|
| 961 |
+
demo.launch()
|