Spaces:
Sleeping
Sleeping
Add Hugging Face OAuth login
Browse filesFiles changed (5)
- README.md+1
- google_sheets_logger.py+5-2
- llm_config.py+25-16
- requirements.txt+1-1
- student_interface.py+139-46
6 unmodified lines7891011126 unmodified linespython_version: 3.11app_file: app.pypinned: false---# π Legacy Code Challenge6 unmodified lines789101112136 unmodified linespython_version: 3.11app_file: app.pypinned: falsehf_oauth: true---# π Legacy Code Challenge
29 unmodified lines30313233343574 unmodified lines11011111211311411511611789 unmodified lines2072082092102112129 unmodified lines22222322422522622729 unmodified lines"Χ ΧΧ’Χ ΧΧ€ΧΧ Χ§Χ¦ΧΧΧͺ ΧΧΧ?","ΧͺΧΧΧΧ¨ ΧΧΧΧ","ΧΧͺΧΧͺΧΧΧͺ Χ’Χ ΧΧ¦'ΧΧ",]74 unmodified linesif current_headers[:len(SUMMARY_HEADERS)] == SUMMARY_HEADERS:returnsheet.update(range_name="A1:M1", values=[SUMMARY_HEADERS])sheet.format("A1:M1", {"textFormat": {"bold": True},"backgroundColor": {"red": 0.9, "green": 0.9, "blue": 0.9},})89 unmodified lineschallenge = submission_record.get("challenge", {}) if submission_record else {}scoring = submission_record.get("scoring", {}) if submission_record else {}submission = submission_record.get("submission", {}) if submission_record else {}row = [timestamp,9 unmodified lines"ΧΧ" if submission.get("touched_bug_function") else "ΧΧ",challenge.get("bug_description", ""),chat_text,]# Write deterministically to the next free row.29 unmodified lines3031323334353674 unmodified lines11111211311411511611711889 unmodified lines2082092102112122132149 unmodified lines22422522622722822923029 unmodified lines"Χ ΧΧ’Χ ΧΧ€ΧΧ Χ§Χ¦ΧΧΧͺ ΧΧΧ?","ΧͺΧΧΧΧ¨ ΧΧΧΧ","ΧΧͺΧΧͺΧΧΧͺ Χ’Χ ΧΧ¦'ΧΧ","Hugging Face username",]74 unmodified linesif current_headers[:len(SUMMARY_HEADERS)] == SUMMARY_HEADERS:returnsheet.update(range_name="A1:N1", values=[SUMMARY_HEADERS])sheet.format("A1:N1", {"textFormat": {"bold": True},"backgroundColor": {"red": 0.9, "green": 0.9, "blue": 0.9},})89 unmodified lineschallenge = submission_record.get("challenge", {}) if submission_record else {}scoring = submission_record.get("scoring", {}) if submission_record else {}submission = submission_record.get("submission", {}) if submission_record else {}student = submission_record.get("student", {}) if submission_record else {}row = [timestamp,9 unmodified lines"ΧΧ" if submission.get("touched_bug_function") else "ΧΧ",challenge.get("bug_description", ""),chat_text,student.get("provider_user_id", ""),]# Write deterministically to the next free row.
3 unmodified lines45678910111213141592 unmodified lines1081091101111121131141151161171181191201211221231241251264 unmodified lines1311321331341351361371383 unmodified lines"""import osfrom typing import Optionalfrom dotenv import load_dotenv# Load environment variables from .env fileload_dotenv()def get_llm(temperature: float = 0.3,92 unmodified linesapi_key = api_key.strip()provider = provider or os.getenv("LLM_PROVIDER", "openai").lower()env_var = "GROQ_API_KEY" if provider == "groq" else "OPENAI_API_KEY"previous_value = os.environ.get(env_var)try:if provider == "groq":os.environ[env_var] = api_keyllm = get_llm(temperature=0, request_timeout=5, max_tokens=5)else:os.environ[env_var] = api_keyllm = get_llm(temperature=0, request_timeout=5, max_tokens=5)# Test callllm.invoke("Hi")return True, f"β {get_provider_name()} API key is valid!"except Exception as e:4 unmodified linesreturn False, f"β οΈ API key valid but quota/rate limit exceeded"else:return False, f"β Error: {str(e)[:100]}"finally:if previous_value is None:os.environ.pop(env_var, None)else:os.environ[env_var] = previous_value3 unmodified lines456789101112131415161718192021222324252627282930313233343536373892 unmodified lines1311321331341351361371381391404 unmodified lines1451461473 unmodified lines"""import osfrom contextlib import contextmanagerfrom threading import RLockfrom typing import Optionalfrom dotenv import load_dotenv# Load environment variables from .env fileload_dotenv()_API_KEY_LOCK = RLock()@contextmanagerdef llm_api_key_context(api_key: Optional[str] = None, provider: Optional[str] = None):"""Temporarily select an API key while preventing cross-session key swaps."""provider = (provider or os.getenv("LLM_PROVIDER", "openai")).lower()env_var = "GROQ_API_KEY" if provider == "groq" else "OPENAI_API_KEY"with _API_KEY_LOCK:previous_value = os.environ.get(env_var)if api_key:os.environ[env_var] = api_key.strip()try:yieldfinally:if previous_value is None:os.environ.pop(env_var, None)else:os.environ[env_var] = previous_valuedef get_llm(temperature: float = 0.3,92 unmodified linesapi_key = api_key.strip()provider = provider or os.getenv("LLM_PROVIDER", "openai").lower()try:with llm_api_key_context(api_key, provider):llm = get_llm(temperature=0, request_timeout=5, max_tokens=5)llm.invoke("Hi")return True, f"β {get_provider_name()} API key is valid!"except Exception as e:4 unmodified linesreturn False, f"β οΈ API key valid but quota/rate limit exceeded"else:return False, f"β Error: {str(e)[:100]}"
2 unmodified lines34567892 unmodified lineslangchain-coregitpythonpython-dotenvgradio>=6.0.0pywebviewuvicorn[standard]gspread2 unmodified lines34567892 unmodified lineslangchain-coregitpythonpython-dotenvgradio[oauth]>=6.0.0pywebviewuvicorn[standard]gspread
58 unmodified lines596061626364651062 unmodified lines11281129113011311132113314 unmodified lines11481149115011511152115385 unmodified lines1239124012411242124312441245124645 unmodified lines12921293129412951296129712981299130013011302130313041305130613072 unmodified lines13101311131213131314131513165 unmodified lines1322132313241325132613271328154 unmodified lines148314841485148614871488148914903 unmodified lines14941495149614971498149915005 unmodified lines1506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815293 unmodified lines15331534153515361537153815394 unmodified lines154415451546154715481549155015511552155315547 unmodified lines156215631564156515661567156848 unmodified lines16171618161916201621162296 unmodified lines171917201721172217231724172531 unmodified lines175717581759176017611762176317641765176617671768176917701771177219 unmodified lines179217931794179517961797103 unmodified lines190119021903190419051906190711 unmodified lines191919201921192219231924192519261927192819291930193144 unmodified lines19761977197819791980198119829 unmodified lines19921993199419951996199719981999200020012002200358 unmodified lines# ββ API Key Validation ββββββββββββββββββββββββββββββββββββββββββββββββββββββββfrom llm_config import validate_api_key as validate_openai_keydef _google_sheets_configured() -> bool:1062 unmodified linesattempt_number: int,debug_logs: str,enable_cloud_uploads: bool,) -> dict:timestamp = datetime.now()submission_id = timestamp.strftime("%Y%m%d_%H%M%S_%f")14 unmodified lines"student": {"name": student_name,"email": "",},"challenge": {"challenge_id": challenge_id,85 unmodified linesPage 3: Results (shown after Submit)"""# Auto-detect: is there an API key in .env?has_env_key = bool(os.getenv("OPENAI_API_KEY"))css = """#code-editor {45 unmodified lines# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ# PAGE 0 β Login (visible only if no .env key)# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββwith gr.Column(visible=not has_env_key, elem_classes=["setup-card"]) as login_page:gr.Markdown("# π Welcome to Legacy Code Challenge\n""### Please enter your details to continue")login_name = gr.Textbox(label="Your Name",placeholder="e.g. Alice Smith",elem_id="login-name",)login_api_key = gr.Textbox(2 unmodified linestype="password",info="Get one at platform.openai.com/api-keys",elem_id="login-api-key",)gr.Markdown("β οΈ **Note:** Your API key is only used for this session and consumes credits from your OpenAI account."5 unmodified lines# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ# PAGE 1 β Setup (visible if .env exists, else hidden)# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββwith gr.Column(visible=has_env_key, elem_classes=["setup-card"]) as setup_page:gr.Markdown("# π Legacy Code Challenge\n""Fill in the details below, then click **Start Challenge**."154 unmodified lines# ββ Login callback ββββββββββββββββββββββββββββββββββββββββββββββββdef on_login(name, api_key):if not name.strip():return (gr.update(), # login page staysgr.update(), # setup page hidden3 unmodified lines"", "" # states empty)valid, msg = validate_openai_key(api_key)if not valid:return (gr.update(),5 unmodified lines)# Success!os.environ["OPENAI_API_KEY"] = api_keyreturn (gr.update(visible=False), # hide logingr.update(visible=True), # show setupgr.update(visible=True), # show logoutgr.update(value=name.strip()), # prefill setup page name"β Logged in!",api_key,name.strip())def on_logout():"""Clear API key and return to login page."""if "OPENAI_API_KEY" in os.environ:del os.environ["OPENAI_API_KEY"]return (gr.update(visible=True), # show logingr.update(visible=False), # hide setupgr.update(visible=False), # hide challengegr.update(visible=False), # hide resultsgr.update(visible=False), # hide logout3 unmodified lines# ββ Setup callback βββββββββββββββββββββββββββββββββββββββββββββββββdef on_start(name, url, nesting_lvl, num_bugs, refactoring, debug, timer_mins, user_name_from_login, user_api_key):logger.info(f"=== START CHALLENGE ===")logger.info(f"User: {user_name_from_login or name}")logger.info(f"URL: {url}")4 unmodified lines# Use login name if available, otherwise name from setup formname_str = user_name_from_login.strip() if user_name_from_login else name.strip()# Ensure API key is set in environment (critical for pipeline)if user_api_key:logger.info("Setting OPENAI_API_KEY from user login")os.environ["OPENAI_API_KEY"] = user_api_keyelse:logger.warning("No user_api_key provided!")logger.info("Yielding loading message...")7 unmodified linestry:logger.info(f"Starting pipeline for {url.strip()}")workspace_path = _run_pipeline(url.strip(), nesting, int(num_bugs), refactoring, debug)logger.info(f"Pipeline completed. Workspace: {workspace_path}")cs = ChallengeState(workspace_path)48 unmodified lines)# ββ Wiring for login ββββββββββββββββββββββββββββββββββββββββββββββlogin_btn.click(on_login,96 unmodified linescs.reset_target()return cs.sabotaged_code, gr.update(selected=1)def on_submit(trigger, hints_used, submit_count, workspace_path, chat_log, hint_log, user_name, code, rel_path):logger.info(f"=== SUBMIT CHALLENGE ===")logger.info(f"Trigger: {trigger}, User: {user_name}, Hints: {hints_used}, Submit#: {submit_count}")logger.info(f"Workspace: {workspace_path}")31 unmodified linessubmitted_code = cs.read_target()print(f"[{datetime.now().strftime('%H:%M:%S')}] π§ͺ Running tests...")result = evaluate_submission(workspace_path=workspace_path,student_code=submitted_code,original_code=cs.original_code,bug_func_name=cs.bug_func_name,hints_used=hints_used,sabotaged_code=cs.sabotaged_code,target_file=str(cs.target_path),bug_func_names=cs.bug_func_names,)new_count = submit_count + 119 unmodified linesattempt_number=new_count,debug_logs=debug_logs,enable_cloud_uploads=True,)log_path = log.save(submission_record)sys.stdout = original_stdout # Restore stdout103 unmodified linesfinally:sys.stdout = original_stdout # Always restore stdoutdef on_send(message, history, hints_used, submit_count, workspace_path, chat_log, hint_log, confirmation_pending):if not message.strip():penalty = PENALTY_TABLE[min(hints_used, len(PENALTY_TABLE) - 1)]return history, "", hints_used, _hint_md(hints_used, penalty), chat_log, hint_log, confirmation_pending11 unmodified lines})return history, "", hints_used, _hint_md(hints_used, 0), new_chat_log, hint_log, Falsecs = ChallengeState(workspace_path)result = get_hint(user_message=message,history=history,hints_used=hints_used,submission_attempts=submit_count,challenge_info=cs.challenge_info(),)# Python-level guarantee: if a confirmation was pending and the student# didn't explicitly decline, the hint counts β regardless of LLM marker.accepted_pending = confirmation_pending and _is_affirmation(message)44 unmodified linessubmit_btn.click(on_submit,inputs=[submit_trigger, hints_used_state, submission_count_state,workspace_state, chat_log_state, hint_log_state, user_name_state, code_editor, file_dropdown],outputs=[challenge_page, # Hide challenge pageresults_page, # Show results page9 unmodified linessend_btn.click(on_send,inputs=[chat_input, chatbot, hints_used_state, submission_count_state, workspace_state, chat_log_state, hint_log_state, confirmation_pending_state],outputs=[chatbot, chat_input, hints_used_state, hint_counter, chat_log_state, hint_log_state, confirmation_pending_state],)chat_input.submit(on_send,inputs=[chat_input, chatbot, hints_used_state, submission_count_state, workspace_state, chat_log_state, hint_log_state, confirmation_pending_state],outputs=[chatbot, chat_input, hints_used_state, hint_counter, chat_log_state, hint_log_state, confirmation_pending_state],)58 unmodified lines5960616263646566676869707172737475767778798081828384858687888990911062 unmodified lines115411551156115711581159116014 unmodified lines11751176117711781179118011811182118385 unmodified lines1269127012711272127312741275127645 unmodified lines132213231324132513261327132813291330133113321333133413351336133713381339134013412 unmodified lines134413451346134713481349135013511352135313545 unmodified lines1360136113621363136413651366154 unmodified lines15211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415453 unmodified lines1549155015511552155315541555155615571558155915601561156215635 unmodified lines1569157015711572157315741575157615771578157915801581158215831584158515861587158815893 unmodified lines1593159415951596159715981599160016011602160316041605160616074 unmodified lines16121613161416151616161716187 unmodified lines1626162716281629163016311632163348 unmodified lines16821683168416851686168716881689169016911692169396 unmodified lines17901791179217931794179517961797179817991800180118021803180431 unmodified lines1836183718381839184018411842184318441845184618471848184918501851185219 unmodified lines1872187318741875187618771878103 unmodified lines19821983198419851986198719881989199019911992199319941995199611 unmodified lines2008200920102011201220132014201520162017201820192020202144 unmodified lines206620672068206920702071207220739 unmodified lines2083208420852086208720882089209020912092209320942095209658 unmodified lines# ββ API Key Validation ββββββββββββββββββββββββββββββββββββββββββββββββββββββββfrom llm_config import llm_api_key_context, validate_api_key as validate_openai_keyHF_OAUTH_REQUIRED = bool(os.getenv("SPACE_ID"))def _configured_llm_api_key() -> str:provider = os.getenv("LLM_PROVIDER", "openai").lower()env_var = "GROQ_API_KEY" if provider == "groq" else "OPENAI_API_KEY"return os.getenv(env_var, "")def _hf_oauth_identity(profile: gr.OAuthProfile | None) -> dict | None:if profile is None:return Noneusername = str(profile.username or "").strip()if not username:return Nonereturn {"provider": "huggingface","provider_user_id": username,"profile_url": str(profile.profile or ""),"display_name": str(profile.name or username).strip(),}def _hf_auth_required(profile: gr.OAuthProfile | None) -> bool:return HF_OAUTH_REQUIRED and _hf_oauth_identity(profile) is Nonedef _google_sheets_configured() -> bool:1062 unmodified linesattempt_number: int,debug_logs: str,enable_cloud_uploads: bool,identity: dict | None = None,) -> dict:timestamp = datetime.now()submission_id = timestamp.strftime("%Y%m%d_%H%M%S_%f")14 unmodified lines"student": {"name": student_name,"email": "","auth_provider": (identity or {}).get("provider", ""),"provider_user_id": (identity or {}).get("provider_user_id", ""),"profile_url": (identity or {}).get("profile_url", ""),},"challenge": {"challenge_id": challenge_id,85 unmodified linesPage 3: Results (shown after Submit)"""# Spaces require an identity even when a server-side model key is configured.has_env_key = bool(_configured_llm_api_key())css = """#code-editor {45 unmodified lines# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ# PAGE 0 β Login (visible only if no .env key)# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββwith gr.Column(visible=not has_env_key or HF_OAUTH_REQUIRED, elem_classes=["setup-card"]) as login_page:gr.Markdown("# π Welcome to Legacy Code Challenge\n""### Please enter your details to continue")if HF_OAUTH_REQUIRED:gr.LoginButton(elem_id="huggingface-login")login_name = gr.Textbox(label="Your Name",placeholder="e.g. Alice Smith",elem_id="login-name",interactive=not HF_OAUTH_REQUIRED,)login_api_key = gr.Textbox(2 unmodified linestype="password",info="Get one at platform.openai.com/api-keys",elem_id="login-api-key",visible=not has_env_key,)if has_env_key:gr.Markdown("The app's configured model key will be used.")gr.Markdown("β οΈ **Note:** Your API key is only used for this session and consumes credits from your OpenAI account."5 unmodified lines# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ# PAGE 1 β Setup (visible if .env exists, else hidden)# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββwith gr.Column(visible=has_env_key and not HF_OAUTH_REQUIRED, elem_classes=["setup-card"]) as setup_page:gr.Markdown("# π Legacy Code Challenge\n""Fill in the details below, then click **Start Challenge**."154 unmodified lines# ββ Login callback ββββββββββββββββββββββββββββββββββββββββββββββββdef on_oauth_profile(profile: gr.OAuthProfile | None):identity = _hf_oauth_identity(profile)if identity is None:return gr.update(), gr.update()return (gr.update(value=identity["display_name"]),f"Signed in to Hugging Face as **@{identity['provider_user_id']}**.",)def on_login(name, api_key, profile: gr.OAuthProfile | None = None):identity = _hf_oauth_identity(profile)if _hf_auth_required(profile):return (gr.update(), gr.update(), gr.update(), gr.update(),"β Sign in with Hugging Face before continuing.", "", "",)name = identity["display_name"] if identity else (name or "").strip()if not name:return (gr.update(), # login page staysgr.update(), # setup page hidden3 unmodified lines"", "" # states empty)submitted_api_key = (api_key or "").strip()api_key_for_validation = submitted_api_key or _configured_llm_api_key()if not api_key_for_validation:return (gr.update(), gr.update(), gr.update(), gr.update(),"β Enter an API key to continue.", "", "",)valid, msg = validate_openai_key(api_key_for_validation)if not valid:return (gr.update(),5 unmodified lines)# Success!return (gr.update(visible=False), # hide logingr.update(visible=True), # show setupgr.update(visible=True), # show logoutgr.update(value=name), # prefill setup page name"β Logged in!",submitted_api_key,name,)def on_logout():"""Clear session values and return to the login page."""return (gr.update(visible=not has_env_key or HF_OAUTH_REQUIRED), # show logingr.update(visible=has_env_key and not HF_OAUTH_REQUIRED), # hide setupgr.update(visible=False), # hide challengegr.update(visible=False), # hide resultsgr.update(visible=False), # hide logout3 unmodified lines# ββ Setup callback βββββββββββββββββββββββββββββββββββββββββββββββββdef on_start(name, url, nesting_lvl, num_bugs, refactoring, debug, timer_mins, user_name_from_login, user_api_key, profile: gr.OAuthProfile | None = None):if _hf_auth_required(profile):yield (gr.update(visible=True, value="β Sign in with Hugging Face before starting a challenge."),gr.update(interactive=True),gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update(), gr.update(),)returnlogger.info(f"=== START CHALLENGE ===")logger.info(f"User: {user_name_from_login or name}")logger.info(f"URL: {url}")4 unmodified lines# Use login name if available, otherwise name from setup formname_str = user_name_from_login.strip() if user_name_from_login else name.strip()if not user_api_key and not _configured_llm_api_key():logger.warning("No user_api_key provided!")logger.info("Yielding loading message...")7 unmodified linestry:logger.info(f"Starting pipeline for {url.strip()}")with llm_api_key_context(user_api_key or None):workspace_path = _run_pipeline(url.strip(), nesting, int(num_bugs), refactoring, debug)logger.info(f"Pipeline completed. Workspace: {workspace_path}")cs = ChallengeState(workspace_path)48 unmodified lines)# ββ Wiring for login ββββββββββββββββββββββββββββββββββββββββββββββdemo.load(on_oauth_profile,inputs=None,outputs=[login_name, login_status],)login_btn.click(on_login,96 unmodified linescs.reset_target()return cs.sabotaged_code, gr.update(selected=1)def on_submit(trigger, hints_used, submit_count, workspace_path, chat_log, hint_log, user_name, code, rel_path, user_api_key, profile: gr.OAuthProfile | None = None):if _hf_auth_required(profile):message = "β Sign in with Hugging Face before submitting."yield (gr.update(visible=True), gr.update(visible=False), message,"", "", "", submit_count, "", message,)returnlogger.info(f"=== SUBMIT CHALLENGE ===")logger.info(f"Trigger: {trigger}, User: {user_name}, Hints: {hints_used}, Submit#: {submit_count}")logger.info(f"Workspace: {workspace_path}")31 unmodified linessubmitted_code = cs.read_target()print(f"[{datetime.now().strftime('%H:%M:%S')}] π§ͺ Running tests...")with llm_api_key_context(user_api_key or None):result = evaluate_submission(workspace_path=workspace_path,student_code=submitted_code,original_code=cs.original_code,bug_func_name=cs.bug_func_name,hints_used=hints_used,sabotaged_code=cs.sabotaged_code,target_file=str(cs.target_path),bug_func_names=cs.bug_func_names,)new_count = submit_count + 119 unmodified linesattempt_number=new_count,debug_logs=debug_logs,enable_cloud_uploads=True,identity=_hf_oauth_identity(profile),)log_path = log.save(submission_record)sys.stdout = original_stdout # Restore stdout103 unmodified linesfinally:sys.stdout = original_stdout # Always restore stdoutdef on_send(message, history, hints_used, submit_count, workspace_path, chat_log, hint_log, confirmation_pending, user_api_key, profile: gr.OAuthProfile | None = None):if _hf_auth_required(profile):response = "Please sign in with Hugging Face before using the assistant."history = list(history or []) + [{"role": "user", "content": message},{"role": "assistant", "content": response},]return history, "", hints_used, _hint_md(hints_used, 0), chat_log, hint_log, confirmation_pendingif not message.strip():penalty = PENALTY_TABLE[min(hints_used, len(PENALTY_TABLE) - 1)]return history, "", hints_used, _hint_md(hints_used, penalty), chat_log, hint_log, confirmation_pending11 unmodified lines})return history, "", hints_used, _hint_md(hints_used, 0), new_chat_log, hint_log, Falsecs = ChallengeState(workspace_path)with llm_api_key_context(user_api_key or None):result = get_hint(user_message=message,history=history,hints_used=hints_used,submission_attempts=submit_count,challenge_info=cs.challenge_info(),)# Python-level guarantee: if a confirmation was pending and the student# didn't explicitly decline, the hint counts β regardless of LLM marker.accepted_pending = confirmation_pending and _is_affirmation(message)44 unmodified linessubmit_btn.click(on_submit,inputs=[submit_trigger, hints_used_state, submission_count_state,workspace_state, chat_log_state, hint_log_state, user_name_state, code_editor, file_dropdown,user_api_key_state],outputs=[challenge_page, # Hide challenge pageresults_page, # Show results page9 unmodified linessend_btn.click(on_send,inputs=[chat_input, chatbot, hints_used_state, submission_count_state, workspace_state, chat_log_state,hint_log_state, confirmation_pending_state, user_api_key_state],outputs=[chatbot, chat_input, hints_used_state, hint_counter, chat_log_state, hint_log_state, confirmation_pending_state],)chat_input.submit(on_send,inputs=[chat_input, chatbot, hints_used_state, submission_count_state, workspace_state, chat_log_state,hint_log_state, confirmation_pending_state, user_api_key_state],outputs=[chatbot, chat_input, hints_used_state, hint_counter, chat_log_state, hint_log_state, confirmation_pending_state],)
README.md+1
google_sheets_logger.py+5-2
llm_config.py+25-16
requirements.txt+1-1
student_interface.py+139-46