Mangesh223 commited on
Commit
7aee70a
·
verified ·
1 Parent(s): 744e021

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -1,9 +1,10 @@
1
- from transformers import pipeline
2
  import gradio as gr
3
 
4
- pipe = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3")
5
-
6
- def analyze(text):
7
- return pipe(f"Analyze this resume: {text}")[0]["generated_text"]
8
-
9
- gr.Interface(fn=analyze, inputs="text", outputs="text").launch()
 
 
 
 
1
  import gradio as gr
2
 
3
+ with gr.Blocks(fill_height=True) as demo:
4
+ with gr.Sidebar():
5
+ gr.Markdown("# Inference Provider")
6
+ gr.Markdown("This Space showcases the mistralai/Mistral-7B-Instruct-v0.3 model, served by the together API. Sign in with your Hugging Face account to use this API.")
7
+ button = gr.LoginButton("Sign in")
8
+ gr.load("models/mistralai/Mistral-7B-Instruct-v0.3", accept_token=button, provider="together")
9
+
10
+ demo.launch()