Spaces:
Runtime error
Runtime error
import logging | |
import os | |
import sys | |
if "." not in sys.path: | |
sys.path.append(".") | |
import gradio as gr | |
import openai | |
import ask_fsdl | |
openai.api_key = os.getenv("OPENAI_API_KEY") | |
runner = ask_fsdl.get_runner() | |
def go(query): | |
model_response = runner(query) | |
logging.info(model_response) | |
return model_response | |
iface = gr.Interface(fn=go, inputs="text", outputs="text") | |
iface.launch() | |