Spaces:
Sleeping
Sleeping
Update modules.py
Browse files- modules.py +2 -0
modules.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import time
|
| 2 |
from typing import Any, List, Optional, Tuple, Union
|
| 3 |
import numpy as np
|
|
@@ -103,6 +104,7 @@ def get_prompt(context:str, query:str)->str:
|
|
| 103 |
def retrieve_query(query:str, df:str, column:str, api_key:str, model:str, temperature:float=0.5, chunk_size:int=100)->str:
|
| 104 |
if not api_key:
|
| 105 |
st.write("Please enter your key")
|
|
|
|
| 106 |
context = semantic_chunk(query=query, df=df, column=column, model=model, api_key=api_key, chunk_size=chunk_size)
|
| 107 |
llm = select_llm(model=model, api_key=api_key, temperature=temperature)
|
| 108 |
prompt = get_prompt(context, query)
|
|
|
|
| 1 |
+
import sys
|
| 2 |
import time
|
| 3 |
from typing import Any, List, Optional, Tuple, Union
|
| 4 |
import numpy as np
|
|
|
|
| 104 |
def retrieve_query(query:str, df:str, column:str, api_key:str, model:str, temperature:float=0.5, chunk_size:int=100)->str:
|
| 105 |
if not api_key:
|
| 106 |
st.write("Please enter your key")
|
| 107 |
+
sys.exit(0)
|
| 108 |
context = semantic_chunk(query=query, df=df, column=column, model=model, api_key=api_key, chunk_size=chunk_size)
|
| 109 |
llm = select_llm(model=model, api_key=api_key, temperature=temperature)
|
| 110 |
prompt = get_prompt(context, query)
|