Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
import os
|
4 |
-
import json
|
5 |
|
6 |
# Function to call the Together API with the provided model
|
7 |
def call_ai_model(all_message):
|
@@ -62,7 +62,6 @@ if st.button("Generate Prediction"):
|
|
62 |
delta = json_data["choices"][0]["delta"]
|
63 |
if "content" in delta:
|
64 |
generated_text += delta["content"]
|
65 |
-
st.write(generated_text) # Update the displayed text incrementally
|
66 |
except json.JSONDecodeError:
|
67 |
continue
|
68 |
|
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
import os
|
4 |
+
import json
|
5 |
|
6 |
# Function to call the Together API with the provided model
|
7 |
def call_ai_model(all_message):
|
|
|
62 |
delta = json_data["choices"][0]["delta"]
|
63 |
if "content" in delta:
|
64 |
generated_text += delta["content"]
|
|
|
65 |
except json.JSONDecodeError:
|
66 |
continue
|
67 |
|