andreska commited on
Commit
298ed93
·
verified ·
1 Parent(s): 7edef57

Test update to check that api works

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -3,19 +3,20 @@ import gradio as gr
3
  from huggingface_hub import InferenceClient
4
 
5
  def analyze_project(project_data, question):
6
- api_key = os.getenv("HF_API_KEY")
7
- client = InferenceClient(api_key=api_key)
8
 
9
- prompt = f"Analyze this project: {project_data}\n\nQuestion: {question}"
10
- inputs = client.encoding("text", prompt)
11
 
12
- outputs = client.generate(
13
- model="Qwen/Qwen2.5-72B-Instruct",
14
- inputs=inputs,
15
- max_new_tokens=100
16
- )
17
 
18
- return outputs["generated_text"][0]
 
19
 
20
  iface = gr.Interface(
21
  analyze_project,
 
3
  from huggingface_hub import InferenceClient
4
 
5
  def analyze_project(project_data, question):
6
+ #api_key = os.getenv("HF_API_KEY")
7
+ #client = InferenceClient(api_key=api_key)
8
 
9
+ #prompt = f"Analyze this project: {project_data}\n\nQuestion: {question}"
10
+ ## inputs = client.encoding("text", prompt)
11
 
12
+ #outputs = client.generate(
13
+ # model="Qwen/Qwen2.5-72B-Instruct",
14
+ # inputs=inputs,
15
+ # max_new_tokens=100
16
+ #)
17
 
18
+ #return outputs["generated_text"][0]
19
+ return f"Project: {project_data}, Query: {question}
20
 
21
  iface = gr.Interface(
22
  analyze_project,