File size: 783 Bytes
0a6f6d8 27b774b 0a6f6d8 27b774b 87932ba 0a6f6d8 27b774b 87932ba 27b774b 5e8a58c 0a6f6d8 27b774b 0a6f6d8 27b774b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# import libraries
import sys
import subprocess
# Define functions for Gradio and Streamlit interfaces
def run_gradio_interface():
subprocess.run(["python", "gradio_app.py"])
def run_streamlit_interface():
subprocess.run(["streamlit", "run", "streamlit_app.py"])
def run_rag_evaluate():
subprocess.run(["python", "eval_app.py"])
# Main function to determine which interface to run
def main():
if "-gradio" in sys.argv:
print("Initializing Gradio Interface!")
run_gradio_interface()
elif "-streamlit" in sys.argv:
print("Initializing Streamlit Interface!")
run_streamlit_interface()
else:
print("Running RAG Evaluation!")
run_rag_evaluate()
# Run the main function
if __name__ == "__main__":
main()
|