Spaces:
Runtime error
Runtime error
Vipul Swarup commited on
Commit ·
c863eab
1
Parent(s): 65dc236
something
Browse files
app.py
CHANGED
|
@@ -51,10 +51,15 @@ submit = st.button('Generate')
|
|
| 51 |
|
| 52 |
#If generate button is clicked
|
| 53 |
if submit:
|
|
|
|
| 54 |
inputDict = json.loads(user_input)
|
| 55 |
-
|
| 56 |
-
response
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
|
|
|
| 51 |
|
| 52 |
#If generate button is clicked
|
| 53 |
if submit:
|
| 54 |
+
# Create a dict object from the JSON input
|
| 55 |
inputDict = json.loads(user_input)
|
| 56 |
+
|
| 57 |
+
# iterate through the dict, and create a new dict with each response from the LLM
|
| 58 |
+
responseDict=[]
|
| 59 |
+
for key in inputDict:
|
| 60 |
+
response = load_answer(key, inputDict[key])
|
| 61 |
+
st.subheader("Answer:")
|
| 62 |
+
st.write(response)
|
| 63 |
+
|
| 64 |
+
|
| 65 |
|