File size: 683 Bytes
7569f1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import os
import streamlit as st
import tempfile
import pandas as pd
from JSONPath_Generator import JSONPath_Generator

#Initialize Streamlit app
st.set_page_config(page_title="👨‍💻 JSON Path Generator")
st.header("JSON Path Generator")

#Input Text Area
json_value = st.text_area(label="JSON Body Input: ")
target_input = st.text_input(label="Target JSON Key: ")
json_condition = st.text_input(label="JSON Conditions (If any): ")

if st.button("Submit"):
    json_path_gen = JSONPath_Generator(json_input=json_value, target_value=target_input,
                                       json_condition=json_condition)
    res = json_path_gen.create_llm_chain()
    st.write(res)