Sandhya commited on
Commit
bd575b4
·
1 Parent(s): 94b323b

First Commit

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -12,7 +12,7 @@ load_dotenv()
12
  HF_TOKEN=os.getenv("HF_TOKEN")
13
  HF_MODEL=os.getenv("HF_MODEL","google/gemma-2-2b")
14
  app=FastAPI(title="MODEL-CARD-CHATBOT")
15
- app.add_middleware(CORSMiddleware,allow_origins=["*"],allow_methods=["*"],allow_headers=["*"])
16
 
17
  agent_instance: Optional[Agent]=None
18
  DEFAULT_PROVIDER:Literal['hf-inference']="hf-inference"
@@ -76,9 +76,6 @@ def chat_function(user_message, history, model_id):
76
  return history, ""
77
 
78
 
79
-
80
-
81
-
82
  def create_gradio_app():
83
  with gr.Blocks(title="Model Card Chatbot") as demo:
84
  gr.Markdown("## 🤖 Model Card Chatbot\nAsk questions about Hugging Face model card")
 
12
  HF_TOKEN=os.getenv("HF_TOKEN")
13
  HF_MODEL=os.getenv("HF_MODEL","google/gemma-2-2b")
14
  app=FastAPI(title="MODEL-CARD-CHATBOT")
15
+ app.add_middleware(CORSMiddleware,allow_origins=["*"])
16
 
17
  agent_instance: Optional[Agent]=None
18
  DEFAULT_PROVIDER:Literal['hf-inference']="hf-inference"
 
76
  return history, ""
77
 
78
 
 
 
 
79
  def create_gradio_app():
80
  with gr.Blocks(title="Model Card Chatbot") as demo:
81
  gr.Markdown("## 🤖 Model Card Chatbot\nAsk questions about Hugging Face model card")